|
@@ -1,17 +1,12 @@
|
|
|
-[gd_scene load_steps=9 format=2]
|
|
|
+[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://component/entity/enemy/Enemy.tscn" type="PackedScene" id=5]
|
|
|
[ext_resource path="res://effect/loose/gameover.wav" type="AudioStream" id=6]
|
|
|
[ext_resource path="res://run/Main.gd" type="Script" id=7]
|
|
|
-
|
|
|
-[sub_resource type="Curve2D" id=1]
|
|
|
-_data = {
|
|
|
-"points": PoolVector2Array( 0, 0, 0, 0, -1.05261, 2.78944, 0, 0, 0, 0, 477.895, 2.78944, 0, 0, 0, 0, 460.055, 715.427, 0, 0, 0, 0, 5.76184, 708.778, 0, 0, 0, 0, -1.05261, 2.78944 )
|
|
|
-}
|
|
|
+[ext_resource path="res://component/entity/spawner/MobSpawner.tscn" type="PackedScene" id=8]
|
|
|
|
|
|
[node name="Root" type="Node"]
|
|
|
|
|
@@ -23,10 +18,6 @@ script = ExtResource( 7 )
|
|
|
__meta__ = {
|
|
|
"_edit_group_": true
|
|
|
}
|
|
|
-Mob = ExtResource( 5 )
|
|
|
-
|
|
|
-[node name="MobTimer" type="Timer" parent="Main"]
|
|
|
-wait_time = 0.53
|
|
|
|
|
|
[node name="ScoreTimer" type="Timer" parent="Main"]
|
|
|
|
|
@@ -37,16 +28,11 @@ one_shot = true
|
|
|
[node name="StartPositon" type="Position2D" parent="Main"]
|
|
|
position = Vector2( 245.263, 375.79 )
|
|
|
|
|
|
-[node name="MobPath" type="Path2D" parent="Main"]
|
|
|
-curve = SubResource( 1 )
|
|
|
-
|
|
|
-[node name="MobSpawnLocation" type="PathFollow2D" parent="Main/MobPath"]
|
|
|
-position = Vector2( -1.05261, 2.78944 )
|
|
|
-rotation = -6.07153e-08
|
|
|
-
|
|
|
[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"]
|
|
@@ -54,9 +40,11 @@ stream = ExtResource( 2 )
|
|
|
|
|
|
[node name="DeathSound" type="AudioStreamPlayer" parent="Main"]
|
|
|
stream = ExtResource( 6 )
|
|
|
-[connection signal="timeout" from="Main/MobTimer" to="Main" method="_on_MobTimer_timeout"]
|
|
|
+[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/Player" method="spawn"]
|
|
|
[connection signal="timeout" from="Main/StartTimer" to="Main" method="_on_StartTimer_timeout"]
|
|
|
[connection signal="hit" from="Main/Player" to="Main" method="game_over"]
|
|
|
+[connection signal="start_game" from="Main/HUD" to="Main/MobSpawner" method="_on_HUD_start_game"]
|
|
|
[connection signal="start_game" from="Main/HUD" to="Main" method="new_game"]
|