aboutsummaryrefslogtreecommitdiffstats
path: root/godot/scenes/Game.gd
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--godot/scenes/Game.gd9
1 files changed, 3 insertions, 6 deletions
diff --git a/godot/scenes/Game.gd b/godot/scenes/Game.gd
index d2dc2ed..56456c0 100644
--- a/godot/scenes/Game.gd
+++ b/godot/scenes/Game.gd
@@ -47,13 +47,8 @@ func _on_MainMenuButton_pressed():
func end_level():
- # save current strokes and reset
- strokes_per_level[current_level_id] = current_strokes
- current_strokes = 0
-
+ open_scoreboard()
post_game = true
-
- open_scoreboard()
func add_stroke():
@@ -84,6 +79,8 @@ func next_level():
levels[current_level_id].hide()
current_level_id = current_level_id + 1
+ current_strokes = 0
+
if current_level_id >= NUM_LEVELS:
get_tree().change_scene("res://scenes/levels/MainMenu.tscn")
return