[gd_scene format=3 uid="uid://drwm27rxxpq3t"]

[ext_resource type="Script" uid="uid://i0r17jo6838m" path="res://scenes/enemy_chicken.gd" id="1_s7c3p"]
[ext_resource type="Texture2D" uid="uid://cy4jggxmnohbb" path="res://sprites/chicken.png" id="2_h1rgn"]
[ext_resource type="Texture2D" uid="uid://bm7fgqwqfqmf4" path="res://sprites/explosion_pallete-swap.png" id="3_s7c3p"]
[ext_resource type="AudioStream" uid="uid://bwdkcyrjnxfhu" path="res://sounds/chicken_thunk.wav" id="4_7ellt"]
[ext_resource type="AudioStream" uid="uid://c7q8cq4h58pfo" path="res://sounds/pew.wav" id="5_od8vd"]

[sub_resource type="RectangleShape2D" id="RectangleShape2D_4gyqm"]
size = Vector2(28.57145, 28.571442)

[sub_resource type="Animation" id="Animation_h1rgn"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [0]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Sprite2D:texture")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [ExtResource("2_h1rgn")]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("Sprite2D:hframes")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [3]
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("Sprite2D:region_rect")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Rect2(0, 0, 84, 32)]
}
tracks/4/type = "value"
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/path = NodePath("AnimationPlayer:speed_scale")
tracks/4/interp = 1
tracks/4/loop_wrap = true
tracks/4/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [1.0]
}

[sub_resource type="Animation" id="Animation_7ellt"]
resource_name = "explode"
step = 0.2
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:texture")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [ExtResource("3_s7c3p")]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Sprite2D:frame")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 0.2, 0.4, 0.6, 0.8),
"transitions": PackedFloat32Array(1, 1, 1, 1, 1),
"update": 1,
"values": [0, 1, 2, 3, 4]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("Sprite2D:hframes")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [5]
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("Sprite2D:region_rect")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Rect2(0, 0, 80, 16)]
}
tracks/4/type = "value"
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/path = NodePath("AnimationPlayer:speed_scale")
tracks/4/interp = 1
tracks/4/loop_wrap = true
tracks/4/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [1.5]
}

[sub_resource type="Animation" id="Animation_s7c3p"]
resource_name = "flap"
length = 0.4
loop_mode = 2
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0.0009999999, 0.2, 0.4),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 1,
"values": [0, 1, 2]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Sprite2D:texture")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [ExtResource("2_h1rgn")]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("Sprite2D:hframes")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [3]
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("Sprite2D:region_rect")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Rect2(0, 0, 84, 32)]
}

[sub_resource type="AnimationLibrary" id="AnimationLibrary_7ellt"]
_data = {
&"RESET": SubResource("Animation_h1rgn"),
&"explode": SubResource("Animation_7ellt"),
&"flap": SubResource("Animation_s7c3p")
}

[node name="EnemyChicken" type="Area2D" unique_id=1433837580 groups=["enemies"]]
scale = Vector2(0.7, 0.7)
script = ExtResource("1_s7c3p")

[node name="Sprite2D" type="Sprite2D" parent="." unique_id=2115910138]
texture = ExtResource("2_h1rgn")
hframes = 3
region_enabled = true
region_rect = Rect2(0, 0, 84, 32)

[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=1841693239]
position = Vector2(4.257474e-07, 1.702989e-07)
scale = Vector2(0.99999917, 0.99999917)
shape = SubResource("RectangleShape2D_4gyqm")

[node name="MoveTimer" type="Timer" parent="." unique_id=1928257014]
one_shot = true

[node name="ShootTimer" type="Timer" parent="." unique_id=1985644907]
one_shot = true

[node name="AnimationPlayer" type="AnimationPlayer" parent="." unique_id=702523492]
libraries/ = SubResource("AnimationLibrary_7ellt")
autoplay = &"flap"

[node name="ChickenHit" type="AudioStreamPlayer2D" parent="." unique_id=484642092]
stream = ExtResource("4_7ellt")
volume_db = -9.26

[node name="Pew" type="AudioStreamPlayer2D" parent="." unique_id=2040231846]
stream = ExtResource("5_od8vd")
volume_db = -16.0
max_polyphony = 4

[connection signal="timeout" from="MoveTimer" to="." method="_on_timer_timeout"]
[connection signal="timeout" from="ShootTimer" to="." method="_on_shoot_timer_timeout"]
