pollen-not-included/entities/Flowers.tscn
Dan f0a7c5ca05 Added health bar and snail behavior enhancements
- Introduced a health bar for flowers, which updates based on the current GameState values.
- Enhanced snail behavior with eating and sleeping states. Snails now have a chance to switch to the sleeping state while eating.
- Improved mouse interaction with snails, allowing them to potentially switch to sleep mode when clicked.
- Refactored cursor management into its own class for better code organization and readability.
- Updated drone placement logic to use the new CursorManager class.
- Added functionality for bees to replenish flower nectar levels after a certain number of deposits.
2024-05-15 13:57:31 +01:00

138 lines
4.4 KiB
Text

[gd_scene load_steps=9 format=3 uid="uid://bme541qdw7nai"]
[ext_resource type="Script" path="res://entities/scripts/flowers.gd" id="1_72iub"]
[ext_resource type="PackedScene" uid="uid://rnykx61eqxyk" path="res://scenes/decor/flower_1.tscn" id="1_biusc"]
[ext_resource type="PackedScene" uid="uid://b7quc1hxenh5p" path="res://scenes/decor/flower_2.tscn" id="2_k5hnf"]
[ext_resource type="Texture2D" uid="uid://dhf4dessaw5p5" path="res://resources/particles/twirl_01.png" id="3_xruiv"]
[ext_resource type="PackedScene" uid="uid://bnwvtlsvxjmel" path="res://entities/Snail.tscn" id="5_5uu7l"]
[sub_resource type="CircleShape2D" id="CircleShape2D_1tovu"]
radius = 142.316
[sub_resource type="Animation" id="Animation_41718"]
resource_name = "Highlight"
length = 5.0
loop_mode = 1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("AreaHighlight:rotation")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 5),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [6.28319, 0.0]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_qs4pr"]
_data = {
"Highlight": SubResource("Animation_41718")
}
[node name="Flowers" type="Node2D"]
script = ExtResource("1_72iub")
[node name="FlowerSprites" type="Node2D" parent="."]
[node name="Flower1" parent="FlowerSprites" instance=ExtResource("1_biusc")]
position = Vector2(-10, 41)
scale = Vector2(0.5, 0.5)
[node name="Flower4" parent="FlowerSprites" instance=ExtResource("1_biusc")]
position = Vector2(-50, -75)
scale = Vector2(0.5, 0.5)
[node name="Flower5" parent="FlowerSprites" instance=ExtResource("1_biusc")]
position = Vector2(-53, -4)
scale = Vector2(0.5, 0.5)
[node name="Flower6" parent="FlowerSprites" instance=ExtResource("1_biusc")]
position = Vector2(45, -69)
scale = Vector2(0.5, 0.5)
[node name="Flower14" parent="FlowerSprites" instance=ExtResource("1_biusc")]
position = Vector2(-99, -46)
scale = Vector2(0.5, 0.5)
[node name="Flower15" parent="FlowerSprites" instance=ExtResource("1_biusc")]
position = Vector2(100, -42)
scale = Vector2(0.5, 0.5)
[node name="Flower16" parent="FlowerSprites" instance=ExtResource("1_biusc")]
position = Vector2(117, 13)
scale = Vector2(0.5, 0.5)
[node name="Flower17" parent="FlowerSprites" instance=ExtResource("1_biusc")]
position = Vector2(71, 88)
scale = Vector2(0.5, 0.5)
[node name="Flower7" parent="FlowerSprites" instance=ExtResource("1_biusc")]
position = Vector2(64, 17)
scale = Vector2(0.5, 0.5)
[node name="Flower8" parent="FlowerSprites" instance=ExtResource("1_biusc")]
position = Vector2(-84, 60)
scale = Vector2(0.5, 0.5)
[node name="Flower9" parent="FlowerSprites" instance=ExtResource("1_biusc")]
position = Vector2(30, 68)
scale = Vector2(0.5, 0.5)
[node name="Flower10" parent="FlowerSprites" instance=ExtResource("1_biusc")]
position = Vector2(0, -61)
scale = Vector2(0.5, 0.5)
[node name="Flower11" parent="FlowerSprites" instance=ExtResource("1_biusc")]
position = Vector2(1, -123)
scale = Vector2(0.5, 0.5)
[node name="Flower12" parent="FlowerSprites" instance=ExtResource("1_biusc")]
position = Vector2(-68, 117)
scale = Vector2(0.5, 0.5)
[node name="Flower13" parent="FlowerSprites" instance=ExtResource("1_biusc")]
position = Vector2(13, 108)
scale = Vector2(0.5, 0.5)
[node name="Flower2" parent="FlowerSprites" instance=ExtResource("2_k5hnf")]
position = Vector2(-31, 83)
scale = Vector2(0.5, 0.5)
[node name="Flower3" parent="FlowerSprites" instance=ExtResource("2_k5hnf")]
position = Vector2(4, -16)
scale = Vector2(0.5, 0.5)
[node name="FlowerCollectionArea" type="Area2D" parent="." groups=["flowers"]]
position = Vector2(1, 2)
collision_layer = 7
collision_mask = 7
[node name="CollisionShape2D" type="CollisionShape2D" parent="FlowerCollectionArea"]
shape = SubResource("CircleShape2D_1tovu")
[node name="AreaHighlight" type="Sprite2D" parent="."]
visible = false
modulate = Color(1, 1, 0.160784, 0.345098)
rotation = 5.02655
scale = Vector2(0.6, 0.6)
texture = ExtResource("3_xruiv")
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
"": SubResource("AnimationLibrary_qs4pr")
}
autoplay = "Highlight"
[node name="Snail" parent="." instance=ExtResource("5_5uu7l")]
[node name="HealthBar" type="ProgressBar" parent="."]
offset_left = -50.0
offset_top = 90.0
offset_right = 50.0
offset_bottom = 110.0
mouse_filter = 2
max_value = 10.0
step = 1.0
show_percentage = false