From 674cef3831ac9e924afbd557201cc19c6f9e83db Mon Sep 17 00:00:00 2001 From: Fabian Hoppe Date: Wed, 29 Mar 2023 16:20:54 +0200 Subject: [PATCH] fix bug where you get from level directly to main menu instead of level selection pressing esc --- project/level/selection/LevelScreenManager.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/project/level/selection/LevelScreenManager.py b/project/level/selection/LevelScreenManager.py index e6799ac..66234aa 100644 --- a/project/level/selection/LevelScreenManager.py +++ b/project/level/selection/LevelScreenManager.py @@ -1,5 +1,7 @@ from abc import abstractmethod +import pygame.time + from level.Level import Level from level.elements.LoadedLevel import LoadedLevel from level.selection.ScreenManager import ScreenManager @@ -29,6 +31,7 @@ class LevelScreenManager(ScreenManager): def tick(self, tick_data: TickData): if tick_data.key_manager.is_keymap_down(KeyManager.KEY_ESCAPE): self.main_loop.select_level_selection(self.level.theme) + pygame.time.delay(100) def player_death(self): self.main_loop.player_death(self.level)