pollen-not-included/entities/Bee.tscn
2024-05-03 20:39:41 +01:00

105 lines
3.4 KiB
Text

[gd_scene load_steps=13 format=3 uid="uid://deek6uv574xas"]
[ext_resource type="Script" path="res://entities/scripts/bee.gd" id="1_pnu7x"]
[ext_resource type="Script" path="res://entities/scripts/finite_state_machine.gd" id="1_t3s5d"]
[ext_resource type="Script" path="res://entities/bee/states/bee_idle.gd" id="3_vasc5"]
[ext_resource type="Script" path="res://entities/bee/states/bee_gather.gd" id="5_4vs4l"]
[ext_resource type="Script" path="res://entities/scripts/bee_hit_box.gd" id="5_agq38"]
[ext_resource type="Script" path="res://entities/bee/states/bee_travelling.gd" id="5_qtx0r"]
[ext_resource type="Script" path="res://entities/bee/states/bee_sleeping.gd" id="7_6qlbu"]
[sub_resource type="Animation" id="Animation_t75ra"]
resource_name = "Idle"
[sub_resource type="Animation" id="Animation_iys4n"]
resource_name = "Flying"
length = 5.0
loop_mode = 1
step = 0.5
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Polygon2D:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 1.5, 2.5, 3.5, 5),
"transitions": PackedFloat32Array(1, 1, 1, 1, 1),
"update": 0,
"values": [Vector2(0, 0), Vector2(0, 10), Vector2(0, -10), Vector2(0, 10), Vector2(0, 0)]
}
[sub_resource type="Animation" id="Animation_0encb"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Polygon2D:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector2(0, 0)]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_m27po"]
_data = {
"Flying": SubResource("Animation_iys4n"),
"Idle": SubResource("Animation_t75ra"),
"RESET": SubResource("Animation_0encb")
}
[sub_resource type="CircleShape2D" id="CircleShape2D_86nxf"]
radius = 22.0907
[node name="Bee" type="CharacterBody2D"]
z_index = 99
collision_mask = 0
script = ExtResource("1_pnu7x")
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
"": SubResource("AnimationLibrary_m27po")
}
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
light_mask = 0
shape = SubResource("CircleShape2D_86nxf")
[node name="HitBox" type="Area2D" parent="."]
collision_layer = 6
collision_mask = 7
script = ExtResource("5_agq38")
[node name="CollisionShape2D" type="CollisionShape2D" parent="HitBox"]
light_mask = 0
shape = SubResource("CircleShape2D_86nxf")
[node name="StateMachine" type="Node2D" parent="." node_paths=PackedStringArray("initial_state")]
script = ExtResource("1_t3s5d")
initial_state = NodePath("Idle")
[node name="Idle" type="Node" parent="StateMachine"]
script = ExtResource("3_vasc5")
[node name="Travelling" type="Node" parent="StateMachine"]
script = ExtResource("5_qtx0r")
[node name="Gathering" type="Node" parent="StateMachine"]
script = ExtResource("5_4vs4l")
[node name="Sleeping" type="Node" parent="StateMachine"]
script = ExtResource("7_6qlbu")
[node name="Polygon2D" type="Polygon2D" parent="."]
color = Color(1, 1, 0.0745098, 1)
polygon = PackedVector2Array(-18, -11, -6, -21, 17, -19, 23, 1, 3, 12, -18, 7)
[node name="CPUParticles2D" type="CPUParticles2D" parent="Polygon2D"]
position = Vector2(0, 2.46663)
gravity = Vector2(0, 0)
[connection signal="area_entered" from="HitBox" to="HitBox" method="_on_area_entered"]
[connection signal="area_exited" from="HitBox" to="HitBox" method="_on_area_exited"]