diff --git a/src/game/EventManager.py b/src/game/EventManager.py index 540b60d..7ee55b6 100644 --- a/src/game/EventManager.py +++ b/src/game/EventManager.py @@ -25,11 +25,14 @@ class EventManager: for event in pygame.event.get(): if event.type == pygame.QUIT: self.game.running = False + self.game.screen.ui.updateBasedOnPygameEvent(event) self.keyTimeout += self.keyTimer.tick() if self.keyTimeout >= TIMEOUT: self.handlePlayerControls(keys) self.keyTimeout = 0 + self.game.screen.ui.updateBasedOnPlayerStats(self.player.statistics) + def handlePlayerControls(self, keys): # Key names are temporary # TODO: Load key bindings from JSON