From 417323cb4033832a9d373100e51886ba2a3e7874 Mon Sep 17 00:00:00 2001 From: SergentThomasKelly Date: Thu, 26 Apr 2018 21:01:01 +0200 Subject: [PATCH] mini improvements added a way to toggle fullscreen in game (press F11) and corrected the stopped animation on left side move. Because having a leg in the air for a long time isn't normal. Even in a game. --- core.py | 2 ++ settings.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/core.py b/core.py index 860f696..93b9da8 100644 --- a/core.py +++ b/core.py @@ -251,6 +251,8 @@ class Game: self.posX -= 16; self.lastMove = "-X"; self.scrolling() if event.key == pg.K_ESCAPE: self.changeMenu("pause") + if event.key == pg.K_F11: + self.toggleFullscreen(); print('fullscreen toggled to ' + str(self.fullscreenState)) elif event.type == pg.KEYUP: if self.lastMove == "+Y": self.picCoordinates = playerAnimation('noneDown', self.gender) diff --git a/settings.py b/settings.py index be5c8bf..b52c092 100644 --- a/settings.py +++ b/settings.py @@ -35,7 +35,7 @@ def playerAnimation(direction, gender): return playerCoordinatesLast[2] elif direction == 'noneLeft': playerCoordinatesLast = playerCoordinatesLast["left"] - return playerCoordinatesLast[playerAnimationLoop] + return playerCoordinatesLast[2] elif direction == 'noneRight': playerCoordinatesLast = playerCoordinatesLast["right"] return playerCoordinatesLast[2]