Main.tscn 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. [gd_scene load_steps=8 format=2]
  2. [ext_resource path="res://Main.cs" 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. _data = {
  10. "points": PackedVector2Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 480, 0, 0, 0, 0, 0, 480, 720, 0, 0, 0, 0, 0, 720, 0, 0, 0, 0, 0, 0)
  11. }
  12. [node name="Main" type="Node"]
  13. script = ExtResource( 1 )
  14. mobScene = ExtResource( 2 )
  15. [node name="ColorRect" type="ColorRect" parent="."]
  16. anchor_right = 1.0
  17. anchor_bottom = 1.0
  18. color = Color(0.219608, 0.372549, 0.380392, 1)
  19. [node name="Player" parent="." instance=ExtResource( 3 )]
  20. [node name="MobTimer" type="Timer" parent="."]
  21. wait_time = 0.5
  22. [node name="ScoreTimer" type="Timer" parent="."]
  23. [node name="StartTimer" type="Timer" parent="."]
  24. wait_time = 2.0
  25. one_shot = true
  26. [node name="StartPosition" type="Position2D" parent="."]
  27. position = Vector2(240, 450)
  28. [node name="MobPath" type="Path2D" parent="."]
  29. curve = SubResource( 1 )
  30. [node name="MobSpawnLocation" type="PathFollow2D" parent="MobPath"]
  31. [node name="HUD" parent="." instance=ExtResource( 4 )]
  32. [node name="Music" type="AudioStreamPlayer" parent="."]
  33. stream = ExtResource( 5 )
  34. [node name="DeathSound" type="AudioStreamPlayer" parent="."]
  35. stream = ExtResource( 6 )
  36. [connection signal="Hit" from="Player" to="." method="GameOver"]
  37. [connection signal="timeout" from="MobTimer" to="." method="OnMobTimerTimeout"]
  38. [connection signal="timeout" from="ScoreTimer" to="." method="OnScoreTimerTimeout"]
  39. [connection signal="timeout" from="StartTimer" to="." method="OnStartTimerTimeout"]
  40. [connection signal="StartGame" from="HUD" to="." method="NewGame"]