pollen-not-included/entities/Snail.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

33 lines
1.3 KiB
Text

[gd_scene load_steps=6 format=3 uid="uid://bnwvtlsvxjmel"]
[ext_resource type="Script" path="res://entities/scripts/snail.gd" id="1_lkvd1"]
[ext_resource type="Script" path="res://entities/scripts/finite_state_machine.gd" id="1_tejvt"]
[ext_resource type="Script" path="res://entities/snail/states/snail_sleeping.gd" id="3_wnrnl"]
[ext_resource type="Script" path="res://entities/snail/states/snail_eating.gd" id="4_1abwi"]
[sub_resource type="CircleShape2D" id="CircleShape2D_2whjo"]
radius = 42.0476
[node name="Snail" type="CharacterBody2D"]
collision_layer = 8
collision_mask = 8
input_pickable = true
script = ExtResource("1_lkvd1")
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
[node name="Polygon2D" type="Polygon2D" parent="."]
polygon = PackedVector2Array(-8, -8, -5, -1, 10, 5, -7, 9, -25, 8, -28, -5, -20, -11)
[node name="StateMachine" type="Node" parent="." node_paths=PackedStringArray("initial_state")]
script = ExtResource("1_tejvt")
initial_state = NodePath("Eating")
[node name="Sleeping" type="Node" parent="StateMachine"]
script = ExtResource("3_wnrnl")
[node name="Eating" type="Node" parent="StateMachine"]
script = ExtResource("4_1abwi")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("CircleShape2D_2whjo")