Main.tscn 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. [gd_scene load_steps=8 format=2]
  2. [ext_resource path="res://component/ui/hud/HUD.tscn" type="PackedScene" id=1]
  3. [ext_resource path="res://run/HouseInAForestLoop.ogg" type="AudioStream" id=2]
  4. [ext_resource path="res://component/ui/background/Background.tscn" type="PackedScene" id=3]
  5. [ext_resource path="res://component/entity/player/Player.tscn" type="PackedScene" id=4]
  6. [ext_resource path="res://effect/loose/gameover.wav" type="AudioStream" id=6]
  7. [ext_resource path="res://run/Main.gd" type="Script" id=7]
  8. [ext_resource path="res://component/entity/spawner/MobSpawner.tscn" type="PackedScene" id=8]
  9. [node name="Root" type="Node"]
  10. [node name="Background" parent="." instance=ExtResource( 3 )]
  11. rect_min_size = Vector2( 100, 100 )
  12. [node name="Main" type="Node2D" parent="."]
  13. script = ExtResource( 7 )
  14. __meta__ = {
  15. "_edit_group_": true
  16. }
  17. [node name="ScoreTimer" type="Timer" parent="Main"]
  18. [node name="StartTimer" type="Timer" parent="Main"]
  19. wait_time = 2.41
  20. one_shot = true
  21. [node name="StartPositon" type="Position2D" parent="Main"]
  22. position = Vector2( 245.263, 375.79 )
  23. [node name="Player" parent="Main" instance=ExtResource( 4 )]
  24. position = Vector2( 245.983, 380.055 )
  25. [node name="MobSpawner" parent="Main" instance=ExtResource( 8 )]
  26. [node name="HUD" parent="Main" instance=ExtResource( 1 )]
  27. [node name="Music" type="AudioStreamPlayer" parent="Main"]
  28. stream = ExtResource( 2 )
  29. [node name="DeathSound" type="AudioStreamPlayer" parent="Main"]
  30. stream = ExtResource( 6 )
  31. [connection signal="game_over" from="Main" to="Main/MobSpawner" method="_on_Main_game_over"]
  32. [connection signal="game_started" from="Main" to="Main/MobSpawner" method="_on_Main_game_started"]
  33. [connection signal="timeout" from="Main/ScoreTimer" to="Main" method="_on_ScoreTimer_timeout"]
  34. [connection signal="timeout" from="Main/StartTimer" to="Main" method="_on_StartTimer_timeout"]
  35. [connection signal="timeout" from="Main/StartTimer" to="Main/Player" method="spawn"]
  36. [connection signal="hit" from="Main/Player" to="Main" method="game_over"]
  37. [connection signal="start_game" from="Main/HUD" to="Main" method="new_game"]
  38. [connection signal="start_game" from="Main/HUD" to="Main/MobSpawner" method="_on_HUD_start_game"]