def __init__(self, manager, position, direction, sprite_sheet, height, width, delay, speed): """manager is the base EnemyBase object position is the rect.center coordinates (taken from the spinning state) direction is a vector """ State.__init__(self, manager) self.sprite = AnimatedFacingSprite(sprite_sheet, height, width, delay, speed) self.sprite.rect.center = position self.direction = direction self.STATE_NUMBER = manager.SHOOTING self.IS_FOLLOWABLE = False
def __init__(self, manager, position, target, sprite_sheet, height, width, delay, targ_time, shoot_time): """manager is the root EnemyBase object position is the sprite's rect.center coordinates (taken from the moving state) sprite_sheet, etc are AnimatedFacingSprite args targ_time is the frame (from start) when target direction is taken shoot_time is the frame (from start) when spinner becomes shooter and begins movement """ State.__init__(self, manager) self.sprite = AnimatedFacingSprite(sprite_sheet, height, width, delay, 0) self.sprite.rect.center = position self.target = target self.targ_time = targ_time self.shoot_time = shoot_time self.tick = 0 self.STATE_NUMBER = manager.SPINNING self.IS_FOLLOWABLE = False