From a60a46cc5362bd6f09f12ebe63d0795fc1a8bed1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Czeka=C5=84ski?= Date: Sun, 5 Apr 2020 23:43:40 +0200 Subject: [PATCH] Add method returning stats field from Player --- src/entities/Player.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/entities/Player.py b/src/entities/Player.py index a7aba49..9a3a2d7 100644 --- a/src/entities/Player.py +++ b/src/entities/Player.py @@ -6,6 +6,8 @@ import pygame class Player(Entity): + statistics: Statistics + def __init__(self, spawnpoint, size): super().__init__("player.jpg", size, (spawnpoint[0] * size, spawnpoint[1] * size)) # Where the player is facing, 0 - north, 1 @@ -36,6 +38,9 @@ class Player(Entity): return self.statistics.stamina return None + def getStatistics(self): + return self.statistics + def rotate(self, rotation): # If the player is not facing given direction, it will not move the first time, it will only get rotated if self.rotation.value != rotation.value: