Esempio n. 1
0
    def __init__(self, position, angle, emit_speed_range=(100, 500)):
        BaseSprite.__init__(self)
        self.position = position
        self.angle = angle
        self.emit_speed_range = emit_speed_range

        self.image = pygame.Surface((5, 5))
        self.image.fill((255, 255, 255))

        self.rect = self.image.get_rect(center=self.position)
Esempio n. 2
0
    def __init__(self, position, angle, emit_speed_range=(100, 500)):
        BaseSprite.__init__(self)
        self.position = position
        self.angle = angle
        self.emit_speed_range = emit_speed_range

        self.image = pygame.Surface((5,5))
        self.image.fill((255,255,255))

        self.rect = self.image.get_rect(center=self.position)
Esempio n. 3
0
    def kill(self):
        BaseSprite.kill(self)
        if self.explode_debris_count:
            for n in range(self.explode_debris_count):
                # angle = random.randint(0, 360)
                angle = random.randint(0, 360)

                size = random.randint(1, self.orig_size//3) if self.orig_size >= 3 else 1
                speed = random.randint(100, 200)

                Debris(self.position, angle, speed, size=size, twinkle=False)
Esempio n. 4
0
    def kill(self):
        BaseSprite.kill(self)
        if self.explode_debris_count:
            for n in range(self.explode_debris_count):
                # angle = random.randint(0, 360)
                angle = random.randint(0, 360)

                size = random.randint(1, self.orig_size //
                                      3) if self.orig_size >= 3 else 1
                speed = random.randint(100, 200)

                Debris(self.position, angle, speed, size=size, twinkle=False)
Esempio n. 5
0
    def __init__(self, position, angle, speed, size=3, twinkle=False):
        BaseSprite.__init__(self, self.containers)

        self.position = position
        self.angle = angle
        self.speed = speed
        self.twinkle = twinkle

        self.rect = pygame.Rect(position, (size, size))
        self.image = pygame.Surface((size, size))
        self.size = size

        self.image.fill((255, 255, 255))
Esempio n. 6
0
    def __init__(self, position, angle, speed, size=3, twinkle=False):
        BaseSprite.__init__(self, self.containers)

        self.position = position
        self.angle = angle
        self.speed = speed
        self.twinkle = twinkle

        self.rect = pygame.Rect(position, (size, size))
        self.image = pygame.Surface((size, size))
        self.size = size

        self.image.fill((255, 255, 255))
Esempio n. 7
0
    def __init__(self, position, angle, speed, size=3, colour=(255, 255, 255)):
        BaseSprite.__init__(self)

        self.position = position
        self.speed = speed
        self.colour = colour

        self.set_angle(angle)

        self.rect = pygame.Rect(position, (size, size))
        self.image = pygame.Surface((size, size))
        # self.image = draw_star(5, size)
        self.image.fill(colour)
        self.size = size
Esempio n. 8
0
    def __init__(self, position, angle, speed, size=3, colour=(255, 255, 255)):
        BaseSprite.__init__(self)

        self.position = position
        self.speed = speed
        self.colour = colour

        self.set_angle(angle)

        self.rect = pygame.Rect(position, (size, size))
        self.image = pygame.Surface((size, size))
        # self.image = draw_star(5, size)
        self.image.fill(colour)
        self.size = size
Esempio n. 9
0
    def __init__(self, position, angle, speed, size=3, twinkle=False):
        BaseSprite.__init__(self)

        self.position = position

        self.speed = speed
        self.twinkle = twinkle

        self.set_angle(angle)

        self.rect = pygame.Rect(position, (size, size))
        # self.image = pygame.Surface((0,0))
        self.image = draw_star(5, size)
        self.orig_size = size
        self.size = size
Esempio n. 10
0
    def __init__(self, position, angle, speed, size=3, twinkle=False):
        BaseSprite.__init__(self)

        self.position = position

        self.speed = speed
        self.twinkle = twinkle

        self.set_angle(angle)

        self.rect = pygame.Rect(position, (size, size))
        # self.image = pygame.Surface((0,0))
        self.image = draw_star(5, size)
        self.orig_size = size
        self.size = size