Refactor to fixed Entity class

This commit is contained in:
Marcin Kostrzewski 2020-04-05 14:52:30 +02:00
parent d88670f456
commit a264ac7cb1

View File

@ -7,10 +7,7 @@ import pygame
class Player(Entity): class Player(Entity):
def __init__(self, spawnpoint, size): def __init__(self, spawnpoint, size):
self.statistics = Statistics(100, 0, 0, 100) super().__init__("player.jpg", size, spawnpoint)
self.image, self.rect = Entity.getTexture("player.jpg", size)
super().__init__(self.image, spawnpoint)
# Where the player is facing, 0 - north, 1 # Where the player is facing, 0 - north, 1
self.rotation = Rotations.NORTH self.rotation = Rotations.NORTH