Fixed: statistics now change by invoking methods instead of variable change

This commit is contained in:
Marcin Kostrzewski 2020-04-05 22:02:15 +02:00
parent a0bbee30d1
commit dc7023adfa

View File

@ -14,7 +14,7 @@ class Player(Entity):
# Move in a desired direction # Move in a desired direction
def move(self, rotation): def move(self, rotation):
self.statistics.stamina -= 1 self.statistics.set_stamina(-1)
if rotation.value == Rotations.NORTH.value: if rotation.value == Rotations.NORTH.value:
self.rect.y -= self.rect.w self.rect.y -= self.rect.w
elif rotation.value == Rotations.EAST.value: elif rotation.value == Rotations.EAST.value: