Cola.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:LD39 作者: Bobsleigh 项目源码 文件源码
def __init__(self, x, y, sceneData, max_health=10):
        super().__init__()

        self.name = "ChargePad"

        self.frameAnimationSpeed = 15
        imageBase = pygame.image.load(os.path.join('img', 'unbranded-cola.png'))
        imageRot = pygame.transform.rotate(imageBase, 10)
        imageRot2 = pygame.transform.rotate(imageBase, 20)
        imageRot3 = pygame.transform.rotate(imageBase, -10)
        frames = [imageRot3,imageBase, imageRot,imageRot2,imageRot,imageBase]
        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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号