From 156f9977e07fe68cc0f9f72c229c0a8e4c10cead Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Czeka=C5=84ski?= Date: Mon, 6 Apr 2020 13:13:47 +0200 Subject: [PATCH] Add ui updates on player pickup in EventManager --- src/game/EventManager.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/game/EventManager.py b/src/game/EventManager.py index 7975494..508dc06 100644 --- a/src/game/EventManager.py +++ b/src/game/EventManager.py @@ -35,8 +35,6 @@ class EventManager: 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 @@ -48,6 +46,7 @@ class EventManager: # Picked up item gets removed from the map if type(object) is Pickupable: object.on_interaction(self.player) + self.game.screen.ui.updateOnPlayerPickup(self.player.statistics, object) self.game.map.removeSpriteFromMap(object) elif type(object) is Interactable: object.on_interaction(self.player)