diff --git a/game.py b/game.py index a82ad23..67469e5 100644 --- a/game.py +++ b/game.py @@ -109,6 +109,7 @@ def run(self) -> None: val = Keystroke() continue elif command == PAUSE: + self.current_scene.reset() self.current_scene = self.pause continue elif command == PLAY: @@ -132,6 +133,7 @@ def run(self) -> None: self.current_scene = self.leaderboard continue elif command == TUTORIAL: + self.current_scene.reset() self.current_scene = self.tutorial continue elif command == END: diff --git a/levels.py b/levels.py index 376f904..7039f75 100644 --- a/levels.py +++ b/levels.py @@ -704,12 +704,14 @@ def pause_menu_action(choice: str) -> Union[int, None]: return PLAY elif choice == "Quit": return QUIT + elif choice == "Main menu": + return TITLE return None pause_menu = Menu( txt=["Game Paused", ""], - choices=["Return", "Quit"], + choices=["Return", "Main menu", "Quit"], action_on_choice=pause_menu_action, )