Initial player implementation
This commit is contained in:
parent
cad65b8ed7
commit
d16711068a
@ -1,6 +1,24 @@
|
|||||||
import src.entities.Entity as Entity
|
from enum import Enum
|
||||||
|
|
||||||
|
from src.entities.Entity import Entity
|
||||||
|
from src.entities.Statistics import Statistics
|
||||||
|
import pygame
|
||||||
|
|
||||||
|
|
||||||
class Player(Entity):
|
class Player(Entity, pygame.sprite.Sprite):
|
||||||
def __init__(self):
|
def __init__(self, spawnpoint, size):
|
||||||
self.statistics
|
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)
|
||||||
|
# Where the player is facing, 0 - north, 1
|
||||||
|
self.rotation = Rotations.NORTH
|
||||||
|
|
||||||
|
|
||||||
|
class Rotations(Enum):
|
||||||
|
NORTH = 0
|
||||||
|
EAST = 1
|
||||||
|
SOUTH = 2
|
||||||
|
WEST = 3
|
Loading…
Reference in New Issue
Block a user