示例#1
0
 def __init__(self):
     pygame.sprite.Sprite.__init__(self)
     self.burstAnimator = Animator.__init__(self)
     self.flowAnimator = Animator.__init__(self)
     self.spawn = True
     self.run_burst = False
     self.hitted_rects = []
示例#2
0
    def __init__(self, pos: list, images):
        super().__init__()
        Animator.__init__(self)

        self.images = images
        self.default_speed = 1600
        self.speed = self.default_speed

        if isinstance(self.images, list):
            self.rect = self.images[0].get_rect(center=pos)
        else:
            self.rect = self.images.get_rect(center=pos)
            self.hitted_rects = [self.rect.copy()]