You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
576 B

6 months ago
import pygame
from .scenes import SceneElement
class Home(SceneElement):
# 大本营
def __init__(self, position, imagefile, walls_position):
super().__init__(position, imagefile[0])
self.__destroyed_image = imagefile[1]
self.__destroyed = False
self.walls_position = walls_position
@property
def destroyed(self):
return self.__destroyed
@destroyed.setter
def destroyed(self, destroyed):
self.__destroyed = destroyed
if destroyed:
self.image = pygame.image.load(self.__destroyed_image)
def draw(self, screen):
screen.blit(self.image, self.rect)