From f4e2799009f1ae91f3a7cc4d5d339c0f2cb8077b Mon Sep 17 00:00:00 2001 From: Marcin Kostrzewski Date: Sun, 5 Apr 2020 21:59:26 +0200 Subject: [PATCH] Player class now has statistics --- src/entities/Player.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/entities/Player.py b/src/entities/Player.py index c47fc35..7234cc7 100644 --- a/src/entities/Player.py +++ b/src/entities/Player.py @@ -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