Merge branch 'writingInfoToConsole' of https://git.wmi.amu.edu.pl/s444409/DSZI_Survival into writingInfoToConsole
This commit is contained in:
commit
2893b4dd2c
@ -1,3 +1,5 @@
|
||||
from time import sleep
|
||||
|
||||
import pygame
|
||||
|
||||
from src.entities.Interactable import Interactable
|
||||
@ -32,6 +34,7 @@ class EventManager:
|
||||
self.game.screen.ui.updateBasedOnPygameEvent(event)
|
||||
self.keyTimeout += self.keyTimer.tick()
|
||||
if self.keyTimeout >= TIMEOUT:
|
||||
if self.player.alive:
|
||||
self.handlePlayerControls(keys)
|
||||
self.keyTimeout = 0
|
||||
|
||||
@ -41,7 +44,6 @@ class EventManager:
|
||||
# Key names are temporary
|
||||
# TODO: Load key bindings from JSON
|
||||
|
||||
if self.player.alive:
|
||||
# Picking up items
|
||||
if keys[pygame.K_SPACE]:
|
||||
object = self.game.map.getEntityOnCoord(self.player.getFacingCoord())
|
||||
|
Loading…
Reference in New Issue
Block a user