fix bug where you get from level directly to main menu instead of level selection pressing esc

main
Fabian Hoppe 2023-03-29 16:20:54 +02:00
parent 9acea09359
commit 674cef3831
1 changed files with 3 additions and 0 deletions

View File

@ -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)