diff --git a/src/entities/Player.py b/src/entities/Player.py index c6c0204..242acc5 100644 --- a/src/entities/Player.py +++ b/src/entities/Player.py @@ -8,12 +8,14 @@ from src.entities.Statistics import Statistics class Player(Entity): - def __init__(self, spawnpoint, size): + def __init__(self, spawnpoint, size, affinities=None): """ Create a player. + :type affinities: Affinities :param spawnpoint: A tuple of coords (x,y) :param size: The size in px + :param affinities: Affinities struct defining player's affinities """ # Entity constructor @@ -35,6 +37,8 @@ class Player(Entity): # Player can move only so fast self.moveTimeout = 100 + self.affinities = affinities + def applyWalkingFatigue(self): """ Lowers player's statistics. Applied every few steps.