15 lines
523 B
Python
15 lines
523 B
Python
import pygame.image
|
|
|
|
from common.helpers import parse_cord
|
|
|
|
|
|
class Castle(pygame.sprite.Sprite):
|
|
def __init__(self, position, group):
|
|
super().__init__(group)
|
|
self.image = pygame.image.load("./resources/textures/castle.png").convert_alpha()
|
|
self.image = pygame.transform.scale(self.image, (78, 78))
|
|
self.position = position
|
|
position_in_px = (parse_cord(position[0]), parse_cord(position[1]))
|
|
self.rect = self.image.get_rect(center=position_in_px)
|
|
self.health = 80
|