WMICraft/models/castle.py
2022-04-11 00:01:57 +02:00

14 lines
490 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))
position_in_px = (parse_cord(position[1]), parse_cord(position[0]))
self.rect = self.image.get_rect(center=position_in_px)
self.health = 80