[gd_scene load_steps=21 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_death.gd" id="5_1q5nb"]
[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"]
[ext_resource type="Script" path="res://entities/bee/states/bee_returning.gd" id="8_dptvu"]
[ext_resource type="Texture2D" uid="uid://ch3qalaaky8ng" path="res://resources/textures/bee_body.png" id="10_yi42o"]
[ext_resource type="Texture2D" uid="uid://bsskcrayofs8n" path="res://resources/textures/bee_wings.png" id="11_utbwk"]
[ext_resource type="Texture2D" uid="uid://b2jr0mt5xymog" path="res://resources/particles/smoke_01.png" id="12_52rft"]

[sub_resource type="Animation" id="Animation_1dh34"]
resource_name = "Death"
length = 2.0
loop_mode = 1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("BeeBody:rotation")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.5, 2),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
"values": [0.0, 1.5708, 1.5708]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("BeeBody:position")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 0.6, 2),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
"values": [Vector2(0, 0), Vector2(0, 50), Vector2(0, 50)]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("ImpactCloud:self_modulate:a")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0, 0.4, 1.3),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
"values": [0.0, 0.0, 0.5]
}
tracks/3/type = "method"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath(".")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(2),
"transitions": PackedFloat32Array(1),
"values": [{
"args": [],
"method": &"queue_free"
}]
}
tracks/4/type = "value"
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/path = NodePath(".:modulate:a")
tracks/4/interp = 1
tracks/4/loop_wrap = true
tracks/4/keys = {
"times": PackedFloat32Array(0, 1.6, 2),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
"values": [1.0, 1.0, 0.0]
}
tracks/5/type = "value"
tracks/5/imported = false
tracks/5/enabled = true
tracks/5/path = NodePath("ImpactCloud:visible")
tracks/5/interp = 1
tracks/5/loop_wrap = true
tracks/5/keys = {
"times": PackedFloat32Array(0, 2),
"transitions": PackedFloat32Array(1, 1),
"update": 1,
"values": [true, false]
}

[sub_resource type="Animation" id="Animation_iys4n"]
resource_name = "Flying"
length = 5.0
loop_mode = 1
step = 0.25
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("BeeBody:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 1, 2, 3, 4, 5),
"transitions": PackedFloat32Array(-2, -2, -2, -2, -2, -2),
"update": 0,
"values": [Vector2(0, 0), Vector2(0, 10), Vector2(0, 5), Vector2(0, -5), Vector2(0, 10), Vector2(0, 0)]
}

[sub_resource type="Animation" id="Animation_t75ra"]
resource_name = "Idle"

[sub_resource type="Animation" id="Animation_0encb"]
length = 0.001

[sub_resource type="AnimationLibrary" id="AnimationLibrary_m27po"]
_data = {
"Death": SubResource("Animation_1dh34"),
"Flying": SubResource("Animation_iys4n"),
"Idle": SubResource("Animation_t75ra"),
"RESET": SubResource("Animation_0encb")
}

[sub_resource type="Animation" id="Animation_muxdj"]
resource_name = "Fly"
length = 0.5
loop_mode = 1
step = 0.05
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("BeeBody/BeeWings:scale")
tracks/0/interp = 1
tracks/0/loop_wrap = false
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45),
"transitions": PackedFloat32Array(-2, -2, -2, -2, -2, -2, -2, -2, -2, -2),
"update": 0,
"values": [Vector2(1, 1), Vector2(1, 0.1), Vector2(1, 1), Vector2(1, 0.1), Vector2(1, 1), Vector2(1, 0.1), Vector2(1, 1), Vector2(1, 0.1), Vector2(1, 1), Vector2(1, 0.1)]
}

[sub_resource type="AnimationLibrary" id="AnimationLibrary_yvewf"]
_data = {
"Fly": SubResource("Animation_muxdj")
}

[sub_resource type="CircleShape2D" id="CircleShape2D_86nxf"]
radius = 13.0384

[node name="Bee" type="CharacterBody2D" groups=["bee"]]
self_modulate = Color(1, 1, 1, 0.169489)
z_index = 99
collision_mask = 0
script = ExtResource("1_pnu7x")

[node name="BeePositionAnimation" type="AnimationPlayer" parent="."]
libraries = {
"": SubResource("AnimationLibrary_m27po")
}

[node name="WingAnimation" type="AnimationPlayer" parent="."]
libraries = {
"": SubResource("AnimationLibrary_yvewf")
}

[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="Death" type="Node" parent="StateMachine"]
script = ExtResource("5_1q5nb")

[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="Returning" type="Node" parent="StateMachine"]
script = ExtResource("8_dptvu")

[node name="BeeBody" type="Sprite2D" parent="."]
position = Vector2(0, 50)
rotation = 1.5708
scale = Vector2(0.1, 0.1)
texture = ExtResource("10_yi42o")

[node name="BeeWings" type="Sprite2D" parent="BeeBody"]
scale = Vector2(1, 0.999992)
texture = ExtResource("11_utbwk")

[node name="CPUParticles2D" type="CPUParticles2D" parent="BeeBody"]
position = Vector2(0, 3.94118)
scale = Vector2(1.52885, 1.5978)
lifetime_randomness = 0.33
gravity = Vector2(0, 0)
linear_accel_min = 5.0
linear_accel_max = 10.0

[node name="Shadow" type="Sprite2D" parent="."]
modulate = Color(0, 0, 0, 0.0784314)
position = Vector2(0, 50)
scale = Vector2(0.07, 0.04)
texture = ExtResource("10_yi42o")

[node name="ImpactCloud" type="CPUParticles2D" parent="."]
self_modulate = Color(1, 1, 1, 0.333333)
position = Vector2(0, 50)
texture = ExtResource("12_52rft")
gravity = Vector2(0, 0)
scale_amount_min = 0.01
scale_amount_max = 0.1

[connection signal="area_entered" from="HitBox" to="HitBox" method="_on_area_entered"]
[connection signal="area_exited" from="HitBox" to="HitBox" method="_on_area_exited"]
