Main.tscn 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. [gd_scene load_steps=8 format=2]
  2. [ext_resource path="res://Main.gd" type="Script" id=1]
  3. [ext_resource path="res://Mob.tscn" type="PackedScene" id=2]
  4. [ext_resource path="res://Player.tscn" type="PackedScene" id=3]
  5. [ext_resource path="res://HUD.tscn" type="PackedScene" id=4]
  6. [ext_resource path="res://art/House In a Forest Loop.ogg" type="AudioStream" id=5]
  7. [ext_resource path="res://art/gameover.wav" type="AudioStream" id=6]
  8. [sub_resource type="Curve2D" id=1]
  9. bake_interval = 5.0
  10. _data = {
  11. "points": PoolVector2Array( 0, 0, 0, 0, 1.70602, 3.56798, 0, 0, 0, 0, 482.263, 3.26522, 0, 0, 0, 0, 480.489, 729.458, 0, 0, 0, 0, 0.794434, 732.118, 0, 0, 0, 0, 1.97066, 3.83263 )
  12. }
  13. [node name="Main" type="Node" index="0"]
  14. script = ExtResource( 1 )
  15. Mob = ExtResource( 2 )
  16. [node name="ColorRect" type="ColorRect" parent="." index="0"]
  17. anchor_left = 0.0
  18. anchor_top = 0.0
  19. anchor_right = 0.0
  20. anchor_bottom = 0.0
  21. margin_right = 486.0
  22. margin_bottom = 734.0
  23. rect_pivot_offset = Vector2( 0, 0 )
  24. rect_clip_content = false
  25. mouse_filter = 0
  26. mouse_default_cursor_shape = 0
  27. size_flags_horizontal = 1
  28. size_flags_vertical = 1
  29. color = Color( 0.253451, 0.425288, 0.429412, 1 )
  30. [node name="Player" parent="." index="1" instance=ExtResource( 3 )]
  31. [node name="MobTimer" type="Timer" parent="." index="2"]
  32. process_mode = 1
  33. wait_time = 0.5
  34. one_shot = false
  35. autostart = false
  36. [node name="ScoreTimer" type="Timer" parent="." index="3"]
  37. process_mode = 1
  38. wait_time = 1.0
  39. one_shot = false
  40. autostart = false
  41. [node name="StartTimer" type="Timer" parent="." index="4"]
  42. process_mode = 1
  43. wait_time = 2.0
  44. one_shot = true
  45. autostart = false
  46. [node name="StartPosition" type="Position2D" parent="." index="5"]
  47. position = Vector2( 240, 450 )
  48. _sections_unfolded = [ "Transform" ]
  49. [node name="HUD" parent="." index="6" instance=ExtResource( 4 )]
  50. transform = Transform2D( 1, 0, 0, 1, 0, 0 )
  51. [node name="Music" type="AudioStreamPlayer" parent="." index="7"]
  52. stream = ExtResource( 5 )
  53. volume_db = -8.0
  54. autoplay = false
  55. mix_target = 0
  56. bus = "Master"
  57. [node name="DeathSound" type="AudioStreamPlayer" parent="." index="8"]
  58. stream = ExtResource( 6 )
  59. volume_db = -5.0
  60. autoplay = false
  61. mix_target = 0
  62. bus = "Master"
  63. [node name="MobPath" type="Path2D" parent="." index="9"]
  64. curve = SubResource( 1 )
  65. [node name="MobSpawnLocation" type="PathFollow2D" parent="MobPath" index="0"]
  66. position = Vector2( 1.70602, 3.56798 )
  67. rotation = -0.000630111
  68. offset = 0.0
  69. h_offset = 0.0
  70. v_offset = 0.0
  71. rotate = true
  72. cubic_interp = true
  73. loop = true
  74. lookahead = 4.0
  75. [connection signal="hit" from="Player" to="." method="game_over"]
  76. [connection signal="timeout" from="MobTimer" to="." method="_on_MobTimer_timeout"]
  77. [connection signal="timeout" from="ScoreTimer" to="." method="_on_ScoreTimer_timeout"]
  78. [connection signal="timeout" from="StartTimer" to="." method="_on_StartTimer_timeout"]
  79. [connection signal="start_game" from="HUD" to="." method="new_game"]