diff --git a/classes/Input.py b/classes/Input.py index 72f4c564..2711845d 100644 --- a/classes/Input.py +++ b/classes/Input.py @@ -18,14 +18,14 @@ def checkForInput(self): def checkForKeyboardInput(self): pressedKeys = pygame.key.get_pressed() - if pressedKeys[K_LEFT] or pressedKeys[K_h] and not pressedKeys[K_RIGHT]: + if pressedKeys[K_LEFT] or pressedKeys[K_h] or pressedKeys[K_a] and not pressedKeys[K_RIGHT]: self.entity.traits["goTrait"].direction = -1 - elif pressedKeys[K_RIGHT] or pressedKeys[K_l] and not pressedKeys[K_LEFT]: + elif pressedKeys[K_RIGHT] or pressedKeys[K_l] or pressedKeys[K_d] and not pressedKeys[K_LEFT]: self.entity.traits["goTrait"].direction = 1 else: self.entity.traits['goTrait'].direction = 0 - isJumping = pressedKeys[K_SPACE] or pressedKeys[K_UP] or pressedKeys[K_k] + isJumping = pressedKeys[K_SPACE] or pressedKeys[K_UP] or pressedKeys[K_k] or pressedKeys[K_w] self.entity.traits['jumpTrait'].jump(isJumping) self.entity.traits['goTrait'].boost = pressedKeys[K_LSHIFT]