[gd_scene load_steps=19 format=4 uid="uid://cpmo7v85uocu6"]

[ext_resource type="Script" uid="uid://cmcp6ldln7rdb" path="res://camera.gd" id="1_1gbyr"]
[ext_resource type="Texture2D" uid="uid://dhs4m6d2y6o3o" path="res://assets/UI/healthbar Gradient.tres" id="1_6bw2v"]
[ext_resource type="Script" uid="uid://co1m2vw7jpvey" path="res://assets/UI/ui.gd" id="1_kem5a"]
[ext_resource type="Texture2D" uid="uid://b0rk3rui1igny" path="res://assets/birb-flying-Sheet.png" id="1_ki1t3"]
[ext_resource type="TileSet" uid="uid://t5ntjnulquxe" path="res://Tiles/TerrainTiles.tres" id="2_4qv1y"]
[ext_resource type="Script" uid="uid://y1jnx0p2rq46" path="res://main character.gd" id="2_vaj4l"]
[ext_resource type="FontFile" uid="uid://dyqn86y567nun" path="res://assets/UI/fonts/OstrichSans-Heavy.otf" id="3_gxmxl"]
[ext_resource type="Script" uid="uid://csfa25g8x57ab" path="res://assets/UI/death_menu.gd" id="5_884kg"]

[sub_resource type="FontVariation" id="FontVariation_n4w22"]
base_font = ExtResource("3_gxmxl")

[sub_resource type="AtlasTexture" id="AtlasTexture_ait3h"]
atlas = ExtResource("1_ki1t3")
region = Rect2(64, 0, 32, 32)

[sub_resource type="AtlasTexture" id="AtlasTexture_y75d5"]
atlas = ExtResource("1_ki1t3")
region = Rect2(0, 0, 32, 32)

[sub_resource type="AtlasTexture" id="AtlasTexture_td4nj"]
atlas = ExtResource("1_ki1t3")
region = Rect2(32, 0, 32, 32)

[sub_resource type="AtlasTexture" id="AtlasTexture_tckeu"]
atlas = ExtResource("1_ki1t3")
region = Rect2(64, 0, 32, 32)

[sub_resource type="AtlasTexture" id="AtlasTexture_w2v4r"]
atlas = ExtResource("1_ki1t3")
region = Rect2(96, 0, 32, 32)

[sub_resource type="AtlasTexture" id="AtlasTexture_rbfvs"]
atlas = ExtResource("1_ki1t3")
region = Rect2(128, 0, 32, 32)

[sub_resource type="AtlasTexture" id="AtlasTexture_dlk52"]
atlas = ExtResource("1_ki1t3")
region = Rect2(160, 0, 32, 32)

[sub_resource type="SpriteFrames" id="SpriteFrames_6dcwx"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_ait3h")
}],
"loop": true,
"name": &"Death",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_y75d5")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_td4nj")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_tckeu")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_w2v4r")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_rbfvs")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_dlk52")
}],
"loop": true,
"name": &"Flight",
"speed": 8.0
}]

[sub_resource type="CircleShape2D" id="CircleShape2D_u05s0"]
radius = 13.0

[node name="World" type="Node2D"]

[node name="UILayer" type="CanvasLayer" parent="."]
layer = 128

[node name="UI" type="Control" parent="UILayer"]
z_index = 8
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = 2.0
offset_top = 2.0
offset_right = -2.0
offset_bottom = -2.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 3
size_flags_vertical = 3
script = ExtResource("1_kem5a")

[node name="topLeft" type="HFlowContainer" parent="UILayer/UI"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2

[node name="health" type="TextureProgressBar" parent="UILayer/UI/topLeft"]
layout_mode = 2
value = 100.0
texture_under = ExtResource("1_6bw2v")
texture_progress = ExtResource("1_6bw2v")
tint_under = Color(0.969382, 0.136172, 0, 1)
tint_over = Color(1, 1, 1, 0.301961)
tint_progress = Color(0.628195, 0.967972, 7.70092e-07, 1)

[node name="healthText" type="Label" parent="UILayer/UI/topLeft/health"]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -8.0
offset_top = -5.5
offset_right = 8.0
offset_bottom = 5.5
grow_horizontal = 2
grow_vertical = 2
theme_override_fonts/font = SubResource("FontVariation_n4w22")
text = "100.0"
horizontal_alignment = 1
vertical_alignment = 1

[node name="debug" type="Label" parent="UILayer/UI/topLeft"]
layout_mode = 2

[node name="deathMenu" type="PanelContainer" parent="UILayer/UI"]
visible = false
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -20.0
offset_top = -20.0
offset_right = 20.0
offset_bottom = 20.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("5_884kg")

[node name="panel" type="HBoxContainer" parent="UILayer/UI/deathMenu"]
layout_mode = 2

[node name="controls" type="VBoxContainer" parent="UILayer/UI/deathMenu/panel"]
layout_mode = 2

[node name="ded" type="Label" parent="UILayer/UI/deathMenu/panel/controls"]
layout_mode = 2
text = "UR DED"
horizontal_alignment = 1

[node name="tryAgain" type="Button" parent="UILayer/UI/deathMenu/panel/controls"]
layout_mode = 2
text = "TRY AGAIN"

[node name="quit" type="Button" parent="UILayer/UI/deathMenu/panel/controls"]
layout_mode = 2
text = "QUIT"

[node name="Label" type="Label" parent="UILayer/UI/deathMenu/panel/controls"]
visible = false
layout_mode = 2
text = "haven't added that yet silly"

[node name="stats" type="VBoxContainer" parent="UILayer/UI/deathMenu/panel"]
layout_mode = 2
size_flags_horizontal = 3

[node name="game time" type="Label" parent="UILayer/UI/deathMenu/panel/stats"]
layout_mode = 2
text = "time: 100 seconds."

[node name="killcount" type="Label" parent="UILayer/UI/deathMenu/panel/stats"]
layout_mode = 2
text = "kills:"
vertical_alignment = 1

[node name="GameLayer" type="CanvasLayer" parent="."]
layer = 2
follow_viewport_enabled = true

[node name="Camera2D" type="Camera2D" parent="GameLayer"]
position_smoothing_enabled = true
script = ExtResource("1_1gbyr")

[node name="Background" type="TileMapLayer" parent="GameLayer"]
texture_filter = 1
tile_map_data = PackedByteArray("[encoded data, 38308 characters]")
tile_set = ExtResource("2_4qv1y")

[node name="Birb2" type="CharacterBody2D" parent="GameLayer"]
position = Vector2(475, 346)
script = ExtResource("2_vaj4l")

[node name="Birb" type="AnimatedSprite2D" parent="GameLayer/Birb2"]
z_index = 1
texture_filter = 1
texture_repeat = 1
sprite_frames = SubResource("SpriteFrames_6dcwx")
animation = &"Flight"
autoplay = "Flight"

[node name="CollisionShape2D" type="CollisionShape2D" parent="GameLayer/Birb2"]
z_index = 2
shape = SubResource("CircleShape2D_u05s0")

[connection signal="deathMenu" from="UILayer/UI" to="UILayer/UI/deathMenu" method="_on_ui_death_menu"]
[connection signal="pressed" from="UILayer/UI/deathMenu/panel/controls/tryAgain" to="UILayer/UI/deathMenu" method="_on_try_again_pressed"]
[connection signal="pressed" from="UILayer/UI/deathMenu/panel/controls/quit" to="UILayer/UI/deathMenu" method="_on_quit_pressed"]
