diff options
Diffstat (limited to 'godot/scenes/Game.gd')
-rw-r--r-- | godot/scenes/Game.gd | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/godot/scenes/Game.gd b/godot/scenes/Game.gd index 58c9e27..d2dc2ed 100644 --- a/godot/scenes/Game.gd +++ b/godot/scenes/Game.gd @@ -41,6 +41,11 @@ func _on_ResumeButton_pressed(): Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED) +func _on_MainMenuButton_pressed(): + get_tree().paused = false + get_tree().change_scene("res://scenes/levels/MainMenu.tscn") + + func end_level(): # save current strokes and reset strokes_per_level[current_level_id] = current_strokes @@ -80,7 +85,7 @@ func next_level(): current_level_id = current_level_id + 1 if current_level_id >= NUM_LEVELS: - # TODO load main menu + get_tree().change_scene("res://scenes/levels/MainMenu.tscn") return # load next level |