def kill_enemy(self): self.time_to_shoot = -1 self.time_to_death = 25 data = GameConfig.get_others('fire') (sprite_x, sprite_y) = data[0] (width, heigth) = data[1] self.image = SpriteManager.load(sprite_x, sprite_y, width, heigth)
def __init__(self, coord): shoot_xcoord = coord[0] shoot_ycoord = coord[1] pygame.sprite.Sprite.__init__(self) data = GameConfig.get_others('enemy_shoot') (sprite_x, sprite_y) = data[0] (width, height) = data[1] self.image, self.rect = SpriteManager.load_all(sprite_x, sprite_y, width, height) self.rect.topleft = (shoot_xcoord + 30), shoot_ycoord + 30 self.move = 10
def __init__(self, shoot_xcoord, shoottype): pygame.sprite.Sprite.__init__(self) data = GameConfig.get_others(shoottype) (sprite_x, sprite_y) = data[0] (width, height) = data[1] self.image, self.rect = SpriteManager.load_all(sprite_x, sprite_y, width, height) if shoottype == 'shoot': # Ojos, disparo normal, velocidad normal self.rect.topleft = (shoot_xcoord + 30), 530 self.move = -10 elif shoottype == 'super_shoot': self.rect.topleft = (shoot_xcoord + 10), 530 self.move = -15