Player cannot walk if it runs out of stamina
This commit is contained in:
parent
4a33b6e761
commit
6994f39864
@ -22,6 +22,8 @@ class Player(Entity):
|
||||
# Move in a desired direction
|
||||
def move(self, rotation):
|
||||
self.movePoints += 1
|
||||
# You can only move if you have enough stamina
|
||||
if self.statistics.stamina > 1:
|
||||
self.applyWalkingFatigue()
|
||||
if rotation.value == Rotations.NORTH.value:
|
||||
self.rect.y -= self.rect.w
|
||||
|
Loading…
Reference in New Issue
Block a user