Player class now has statistics

This commit is contained in:
Marcin Kostrzewski 2020-04-05 21:59:26 +02:00
parent c5fddf144d
commit f4e2799009

View File

@ -10,6 +10,7 @@ class Player(Entity):
super().__init__("player.jpg", size, (spawnpoint[0] * size, spawnpoint[1] * size))
# Where the player is facing, 0 - north, 1
self.rotation = Rotations.NORTH
self.statistics = Statistics(100, 0, 0, 100)
# Move in a desired direction
def move(self, rotation):
@ -28,6 +29,7 @@ class Player(Entity):
self.image = pygame.transform.rotate(self.image, ((self.rotation.value - rotation.value) * 90))
self.rotation = rotation
class Rotations(Enum):
NORTH = 0
EAST = 1