def __init__(self, x, y, sceneData, max_health=10):
super().__init__()
self.name = "ChargePad"
self.frameAnimationSpeed = 20
imageBase = pygame.image.load(os.path.join('img', 'charge-pad.png'))
imageFlash = pygame.image.load(os.path.join('img', 'charge-pad-flash.png'))
frames = [imageBase, imageFlash]
self.animation = Animation(frames, self.frameAnimationSpeed, True)
self.image = frames[0]
self.imageTransparent = pygame.Surface((1, 1),pygame.SRCALPHA)
self.rect = self.image.get_rect() # Position centrée du player
self.x = x
self.y = y
self.rect.x = x
self.rect.y = y
self.sceneData = sceneData
评论列表
文章目录