[gd_scene load_steps=8 format=2]

[ext_resource path="res://component/ui/hud/HUD.tscn" type="PackedScene" id=1]
[ext_resource path="res://run/HouseInAForestLoop.ogg" type="AudioStream" id=2]
[ext_resource path="res://component/ui/background/Background.tscn" type="PackedScene" id=3]
[ext_resource path="res://component/entity/player/Player.tscn" type="PackedScene" id=4]
[ext_resource path="res://effect/loose/gameover.wav" type="AudioStream" id=6]
[ext_resource path="res://run/Main.gd" type="Script" id=7]
[ext_resource path="res://component/entity/spawner/MobSpawner.tscn" type="PackedScene" id=8]

[node name="Root" type="Node"]

[node name="Background" parent="." instance=ExtResource( 3 )]
rect_min_size = Vector2( 100, 100 )

[node name="Main" type="Node2D" parent="."]
script = ExtResource( 7 )
__meta__ = {
"_edit_group_": true
}

[node name="ScoreTimer" type="Timer" parent="Main"]

[node name="StartTimer" type="Timer" parent="Main"]
wait_time = 2.41
one_shot = true

[node name="StartPositon" type="Position2D" parent="Main"]
position = Vector2( 245.263, 375.79 )

[node name="Player" parent="Main" instance=ExtResource( 4 )]
position = Vector2( 245.983, 380.055 )

[node name="MobSpawner" parent="Main" instance=ExtResource( 8 )]

[node name="HUD" parent="Main" instance=ExtResource( 1 )]

[node name="Music" type="AudioStreamPlayer" parent="Main"]
stream = ExtResource( 2 )

[node name="DeathSound" type="AudioStreamPlayer" parent="Main"]
stream = ExtResource( 6 )

[connection signal="game_over" from="Main" to="Main/MobSpawner" method="_on_Main_game_over"]
[connection signal="game_started" from="Main" to="Main/MobSpawner" method="_on_Main_game_started"]
[connection signal="timeout" from="Main/ScoreTimer" to="Main" method="_on_ScoreTimer_timeout"]
[connection signal="timeout" from="Main/StartTimer" to="Main" method="_on_StartTimer_timeout"]
[connection signal="timeout" from="Main/StartTimer" to="Main/Player" method="spawn"]
[connection signal="hit" from="Main/Player" to="Main" method="game_over"]
[connection signal="start_game" from="Main/HUD" to="Main" method="new_game"]
[connection signal="start_game" from="Main/HUD" to="Main/MobSpawner" method="_on_HUD_start_game"]
