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.
This commit is contained in:
SergentThomasKelly 2018-04-26 21:01:01 +02:00
parent 05eedc9351
commit 417323cb40
2 changed files with 3 additions and 1 deletions

View File

@ -251,6 +251,8 @@ class Game:
self.posX -= 16; self.lastMove = "-X"; self.scrolling() self.posX -= 16; self.lastMove = "-X"; self.scrolling()
if event.key == pg.K_ESCAPE: if event.key == pg.K_ESCAPE:
self.changeMenu("pause") self.changeMenu("pause")
if event.key == pg.K_F11:
self.toggleFullscreen(); print('fullscreen toggled to ' + str(self.fullscreenState))
elif event.type == pg.KEYUP: elif event.type == pg.KEYUP:
if self.lastMove == "+Y": if self.lastMove == "+Y":
self.picCoordinates = playerAnimation('noneDown', self.gender) self.picCoordinates = playerAnimation('noneDown', self.gender)

View File

@ -35,7 +35,7 @@ def playerAnimation(direction, gender):
return playerCoordinatesLast[2] return playerCoordinatesLast[2]
elif direction == 'noneLeft': elif direction == 'noneLeft':
playerCoordinatesLast = playerCoordinatesLast["left"] playerCoordinatesLast = playerCoordinatesLast["left"]
return playerCoordinatesLast[playerAnimationLoop] return playerCoordinatesLast[2]
elif direction == 'noneRight': elif direction == 'noneRight':
playerCoordinatesLast = playerCoordinatesLast["right"] playerCoordinatesLast = playerCoordinatesLast["right"]
return playerCoordinatesLast[2] return playerCoordinatesLast[2]