[gd_scene load_steps=16 format=3 uid="uid://d1wjw5tobpb3w"]

[ext_resource type="Script" uid="uid://toi3fh8d7cs4" path="res://Scripts/Classes/BooRaceHandler.gd" id="1_1pu8q"]
[ext_resource type="Texture2D" uid="uid://d0jy2sbxh706d" path="res://Assets/Sprites/UI/RaceCountdown.png" id="2_csmob"]
[ext_resource type="Script" uid="uid://bafdl3y53ly60" path="res://Scripts/Classes/UI/PackAnimatedSprite2D.gd" id="3_6r3jq"]
[ext_resource type="Script" uid="uid://cq6f682453q6o" path="res://Scripts/Classes/Components/ResourceSetter.gd" id="4_qeaax"]
[ext_resource type="Script" uid="uid://cmvlgsjmsk0v5" path="res://Scripts/Classes/Resources/ThemedResource.gd" id="5_reyer"]
[ext_resource type="AudioStream" uid="uid://bri3u342yy5hk" path="res://Assets/Audio/SFX/RaceCountdown.wav" id="6_qeaax"]

[sub_resource type="AtlasTexture" id="AtlasTexture_5ptkl"]
atlas = ExtResource("2_csmob")
region = Rect2(0, 0, 16, 16)

[sub_resource type="AtlasTexture" id="AtlasTexture_6r3jq"]
atlas = ExtResource("2_csmob")
region = Rect2(16, 0, 16, 16)

[sub_resource type="AtlasTexture" id="AtlasTexture_axajb"]
atlas = ExtResource("2_csmob")
region = Rect2(32, 0, 16, 16)

[sub_resource type="AtlasTexture" id="AtlasTexture_qeaax"]
atlas = ExtResource("2_csmob")
region = Rect2(0, 16, 32, 16)

[sub_resource type="SpriteFrames" id="SpriteFrames_xhbjt"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_5ptkl")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_6r3jq")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_axajb")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_qeaax")
}],
"loop": false,
"name": &"default",
"speed": 1.0
}]

[sub_resource type="Resource" id="Resource_xhbjt"]
script = ExtResource("5_reyer")
Overworld = SubResource("SpriteFrames_xhbjt")
metadata/_custom_type_script = "uid://cmvlgsjmsk0v5"

[sub_resource type="Animation" id="Animation_6r3jq"]
resource_name = "CountdownBeep"
length = 4.0
step = 1.0
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("CanvasLayer:visible")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [true]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("CanvasLayer/Control/Control/Sprite:frame")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0.01, 1, 2, 3),
"transitions": PackedFloat32Array(1, 1, 1, 1),
"update": 1,
"values": [0, 1, 2, 3]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("CanvasLayer/Control/Control/Sprite:visible")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0, 4),
"transitions": PackedFloat32Array(1, 1),
"update": 1,
"values": [true, false]
}

[sub_resource type="Animation" id="Animation_axajb"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("CanvasLayer:visible")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("CanvasLayer/Control/Control/Sprite:frame")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [0]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("CanvasLayer/Control/Control/Sprite:visible")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [true]
}

[sub_resource type="AnimationLibrary" id="AnimationLibrary_qeaax"]
_data = {
&"CountdownBeep": SubResource("Animation_6r3jq"),
&"RESET": SubResource("Animation_axajb")
}

[node name="BooRaceHandler" type="Node"]
script = ExtResource("1_1pu8q")

[node name="CanvasLayer" type="CanvasLayer" parent="."]
visible = false

[node name="Control" type="CenterContainer" parent="CanvasLayer"]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2

[node name="Control" type="Control" parent="CanvasLayer/Control"]
layout_mode = 2

[node name="Sprite" type="AnimatedSprite2D" parent="CanvasLayer/Control/Control"]
sprite_frames = SubResource("SpriteFrames_xhbjt")
autoplay = "default"
speed_scale = 0.0
script = ExtResource("3_6r3jq")

[node name="ResourceSetter" type="Node" parent="CanvasLayer/Control/Control/Sprite" node_paths=PackedStringArray("node_to_affect")]
process_mode = 3
script = ExtResource("4_qeaax")
node_to_affect = NodePath("..")
property_name = "sprite_frames"
themed_resource = SubResource("Resource_xhbjt")
metadata/_custom_type_script = "uid://cq6f682453q6o"

[node name="Countdown" type="AudioStreamPlayer" parent="."]
stream = ExtResource("6_qeaax")
autoplay = true
bus = &"SFX"

[node name="Animation" type="AnimationPlayer" parent="."]
libraries = {
&"": SubResource("AnimationLibrary_qeaax")
}

[node name="Timer" type="Timer" parent="."]
process_mode = 1
wait_time = 5.0

[connection signal="timeout" from="Timer" to="." method="on_timeout"]
