Main.tscn 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. [gd_scene load_steps=9 format=2]
  2. [ext_resource path="res://Background.tscn" type="PackedScene" id=1]
  3. [ext_resource path="res://Main.gd" type="Script" id=2]
  4. [ext_resource path="res://Enemy.tscn" type="PackedScene" id=3]
  5. [ext_resource path="res://Player.tscn" type="PackedScene" id=4]
  6. [ext_resource path="res://HUD.tscn" type="PackedScene" id=5]
  7. [ext_resource path="res://dodge_assets/art/House In a Forest Loop.ogg" type="AudioStream" id=6]
  8. [ext_resource path="res://dodge_assets/art/gameover.wav" type="AudioStream" id=7]
  9. [sub_resource type="Curve2D" id=1]
  10. _data = {
  11. "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 )
  12. }
  13. [node name="Root" type="Node"]
  14. [node name="Background" parent="." instance=ExtResource( 1 )]
  15. rect_min_size = Vector2( 100, 100 )
  16. [node name="Main" type="Node2D" parent="."]
  17. script = ExtResource( 2 )
  18. __meta__ = {
  19. "_edit_group_": true
  20. }
  21. Mob = ExtResource( 3 )
  22. [node name="MobTimer" type="Timer" parent="Main"]
  23. wait_time = 0.53
  24. [node name="ScoreTimer" type="Timer" parent="Main"]
  25. [node name="StartTimer" type="Timer" parent="Main"]
  26. wait_time = 2.41
  27. one_shot = true
  28. [node name="StartPositon" type="Position2D" parent="Main"]
  29. position = Vector2( 245.263, 375.79 )
  30. [node name="MobPath" type="Path2D" parent="Main"]
  31. curve = SubResource( 1 )
  32. [node name="MobSpawnLocation" type="PathFollow2D" parent="Main/MobPath"]
  33. position = Vector2( -1.05261, 2.78944 )
  34. rotation = -6.07153e-08
  35. [node name="Player" parent="Main" instance=ExtResource( 4 )]
  36. position = Vector2( 245.983, 380.055 )
  37. [node name="HUD" parent="Main" instance=ExtResource( 5 )]
  38. [node name="Music" type="AudioStreamPlayer" parent="Main"]
  39. stream = ExtResource( 6 )
  40. [node name="DeathSound" type="AudioStreamPlayer" parent="Main"]
  41. stream = ExtResource( 7 )
  42. [connection signal="timeout" from="Main/MobTimer" to="Main" method="_on_MobTimer_timeout"]
  43. [connection signal="timeout" from="Main/ScoreTimer" to="Main" method="_on_ScoreTimer_timeout"]
  44. [connection signal="timeout" from="Main/StartTimer" to="Main/Player" method="spawn"]
  45. [connection signal="timeout" from="Main/StartTimer" to="Main" method="_on_StartTimer_timeout"]
  46. [connection signal="hit" from="Main/Player" to="Main" method="game_over"]
  47. [connection signal="start_game" from="Main/HUD" to="Main" method="new_game"]