Ejemplo n.º 1
0
 def __init__(self, playerData=None, *containers):
     BaseUnit.__init__(self, *containers)
     if playerData is None:
         self.image = pygame.image.load(GAME_PATH + "/resources/tiles/player.bmp").convert()
         self.rect = self.image.get_rect()
         self.speed = 3
         self.x = 100
         self.y = 100
         # Hitbox = (top, left, down, right)
         self.hitbox = (16, 16, 16, 16)
         # Starting position
         self.rect.top = 100 - self.hitbox[0]
         self.rect.left = 100 - self.hitbox[1]
     else:
         pass
Ejemplo n.º 2
0
 def __init__(self, number=0, name="", path="", solid=False, *containers):
     BaseUnit.__init__(self, *containers)
     self._number = number
     self._name = name
     self._path = path
     self._solid = solid