diff --git a/src/entities/Entity.py b/src/entities/Entity.py index cda0aed..98dff66 100644 --- a/src/entities/Entity.py +++ b/src/entities/Entity.py @@ -2,10 +2,11 @@ from pathlib import Path import pygame -class Entity: +class Entity(pygame.sprite.Sprite): nextId = 1 def __init__(self, texture, pos): + super().__init__() self.image = texture self.rect = self.image.get_rect() self.rect.x = pos[0] diff --git a/src/entities/Player.py b/src/entities/Player.py index c51f272..667372b 100644 --- a/src/entities/Player.py +++ b/src/entities/Player.py @@ -5,14 +5,12 @@ from src.entities.Statistics import Statistics import pygame -class Player(Entity, pygame.sprite.Sprite): +class Player(Entity): def __init__(self, spawnpoint, size): - pygame.sprite.Sprite.__init__(self) - self.statistics = Statistics(100, 0, 0, 100) self.image, self.rect = Entity.getTexture("player.jpg", size) - super(Player, self).__init__(self.image, spawnpoint) + super().__init__(self.image, spawnpoint) # Where the player is facing, 0 - north, 1 self.rotation = Rotations.NORTH