[gd_scene load_steps=11 format=2]

[ext_resource path="res://Rooms/Outdoors2/bird_scene.png" type="Texture" id=1]
[ext_resource path="res://Rooms/Outdoors2/bird_key_sheet.png" type="Texture" id=2]
[ext_resource path="res://Rooms/Outdoors2/BirdScene.gd" type="Script" id=3]
[ext_resource path="res://Rooms/Outdoors2/Bird.gd" type="Script" id=4]
[ext_resource path="res://Helpers/CanQuit.tscn" type="PackedScene" id=5]

[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 6, 10 )

[sub_resource type="Animation" id=2]
resource_name = "FlyAway"
length = 0.8
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite:frame_coords")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7 ),
"transitions": PoolRealArray( 1, 1, 1, 1, 1, 1, 1, 1 ),
"update": 1,
"values": [ Vector2( 0, 2 ), Vector2( 1, 2 ), Vector2( 2, 2 ), Vector2( 3, 2 ), Vector2( 0, 2 ), Vector2( 1, 2 ), Vector2( 2, 2 ), Vector2( 3, 2 ) ]
}
tracks/1/type = "value"
tracks/1/path = NodePath(".:position")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0, 0.8 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ Vector2( 16, 15 ), Vector2( -6, -12 ) ]
}

[sub_resource type="Animation" id=3]
length = 0.1
loop = true
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite:frame_coords")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ Vector2( 0, 0 ) ]
}

[sub_resource type="Animation" id=4]
length = 0.2
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite:frame_coords")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.1 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 1,
"values": [ Vector2( 0, 1 ), Vector2( 1, 1 ) ]
}

[sub_resource type="Animation" id=5]
resource_name = "Sing"
length = 1.5
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite:frame_coords")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.1, 0.3, 0.4, 0.7, 0.8, 0.9, 1, 1.1, 1.2, 1.3, 1.4 ),
"transitions": PoolRealArray( 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ),
"update": 1,
"values": [ Vector2( 0, 3 ), Vector2( 1, 3 ), Vector2( 2, 3 ), Vector2( 3, 3 ), Vector2( 4, 3 ), Vector2( 5, 3 ), Vector2( 6, 3 ), Vector2( 7, 3 ), Vector2( 8, 3 ), Vector2( 9, 3 ), Vector2( 10, 3 ), Vector2( 11, 3 ) ]
}

[node name="BirdScene" type="Node2D"]
script = ExtResource( 3 )

[node name="CanQuit" parent="." instance=ExtResource( 5 )]

[node name="Background" type="Sprite" parent="."]
texture = ExtResource( 1 )
centered = false
hframes = 2

[node name="Bird" type="Node2D" parent="."]
position = Vector2( 16, 15 )
script = ExtResource( 4 )

[node name="Area" type="Area2D" parent="Bird"]

[node name="CollisionShape2D" type="CollisionShape2D" parent="Bird/Area"]
position = Vector2( 0, 1 )
shape = SubResource( 1 )

[node name="Sprite" type="Sprite" parent="Bird"]
texture = ExtResource( 2 )
vframes = 4
hframes = 12
frame = 36

[node name="AnimationPlayer" type="AnimationPlayer" parent="Bird"]
autoplay = "Idle"
anims/FlyAway = SubResource( 2 )
anims/Idle = SubResource( 3 )
anims/Prepare = SubResource( 4 )
anims/Sing = SubResource( 5 )

[node name="Timer" type="Timer" parent="Bird"]
[connection signal="input_event" from="Bird/Area" to="Bird" method="_on_Area_input_event"]
[connection signal="timeout" from="Bird/Timer" to="Bird" method="_on_Timer_timeout"]
