@@ -9,6 +9,10 @@ func new_game():
$Player.spawn($StartPositon.position)
$StartTimer.start()
+func game_over():
+ $ScoreTimer.stop()
+ $MobTimer.stop()
+
func _ready():
randomize() # Plant seed for random number generation
new_game() # Remove when HUD implemented
@@ -41,3 +41,4 @@ position = Vector2( 245.983, 380.055 )
[connection signal="timeout" from="ScoreTimer" to="." method="_on_ScoreTimer_timeout"]
[connection signal="timeout" from="StartTimer" to="Player" method="spawn"]
[connection signal="timeout" from="StartTimer" to="." method="_on_StartTimer_timeout"]
+[connection signal="hit" from="Player" to="." method="game_over"]