public override void GetPose(EnemyHuman human, PlayerState pose) { Sheathed = true; pose.LeftArm = ArmState.Angular(5); pose.RightArm = ArmState.Angular(5); pose.Shield = ShieldState.KatanaSheath(MathHelper.ToRadians(-20)); }
public ActionShockwave(EnemyHuman player, float plungeStartTime, float plungeFinishTime, Weapon weapon, int shockwaveCount = 2) : base(player, plungeStartTime, plungeFinishTime, weapon) { PlungeStartTime = plungeStartTime; PlungeFinishTime = plungeFinishTime; Weapon = weapon; ShockwaveCount = shockwaveCount; }
public ActionWandBlast(EnemyHuman human, float upTime, float downTime, WeaponWand weapon) : base(human) { SlashUpTime = upTime; SlashDownTime = downTime; Weapon = weapon; PlaySFX(sfx_wand_charge, 1.0f, 0.1f, 0.4f); }
public override void GetPose(EnemyHuman human, PlayerState pose) { pose.WeaponHold = WeaponHold.Left; pose.LeftArm = ArmState.Angular(1); pose.RightArm = ArmState.Angular(9); pose.Weapon = GetWeaponState(human, MathHelper.ToRadians(-22.5f)); }
public ActionSlash(EnemyHuman player, float slashStartTime, float slashUpTime, float slashDownTime, float slashFinishTime, Weapon weapon) : base(player) { SlashStartTime = slashStartTime; SlashUpTime = slashUpTime; SlashDownTime = slashDownTime; SlashFinishTime = slashFinishTime; Weapon = weapon; }
public override void UpdateDiscrete(EnemyHuman holder) { if (!FireballReady && !(holder.CurrentAction is ActionAttack) && (LastFireball == null || LastFireball.Destroyed)) { new WeaponFlash(holder, 20); FireballReady = true; } }
public override void StepOn(EnemyHuman human) { if (!Triggered) { Trigger(human); } LastTrigger = World.Frame; }
public override void StepOn(EnemyHuman human) { if (human is MoaiMan) { return; //Moaimen are spike-immune } human.Hit(-Util.GetFacingVector(human.Facing) * 1 + new Vector2(0, -2), 20, 50, Damage); }
public override void Trigger(EnemyHuman human) { if (human is Player) { World.Hitstop = 10; } Scheduler.Instance.Run(new Coroutine(SlowBlast(human))); }
public override void Trigger(EnemyHuman human) { if (human is MoaiMan) { return; } PlaySFX(sfx_player_hurt, 0.4f, 0.3f, 0.3f); }
public IEnumerable <Wait> Teleport(EnemyHuman human, Vector2 destination) { human.Hitstop = 30; yield return(new WaitDelta(World, 30)); human.Position = Destination; }
public override void Shoot(EnemyHuman shooter, Vector2 position, Vector2 direction) { new SpellAzure(shooter.World, position) { Velocity = direction * 3, FrameEnd = 70, Shooter = shooter }; }
public ActionCharge(EnemyHuman human, float chargeTime, ActionBase chargeAction, Weapon weapon, bool slowDown, float slowDownAmount) : base(human) { ChargeTime = chargeTime; ChargeAction = chargeAction; Weapon = weapon; SlowDown = slowDown; SlowDownAmount = slowDownAmount; chargingFX = new ChargeEffect(human.World, human.Position, 0, chargeTime, human); }
public override void StepOn(EnemyHuman human) { base.StepOn(human); if (!human.Dead) { human.AddStatusEffect(new Doom(human, 1, 30)); } }
public CrimsonSawEffect(GameWorld world, float angle, ActionCrimsonSaw sawAction) : base(world, Vector2.Zero) { Angle = angle; SawAction = sawAction; Human = SawAction.Human; Sound = Game.sfx_sawblade.Play(); Sound.Pitch = 0; Sound.Looping = true; }
public ActionLanceThrust(EnemyHuman human, float upTime, float downTime, Weapon weapon) : base(human, upTime, downTime, weapon) { new ScreenShakeRandom(Human.World, 5, 5); Human.Velocity.X += GetFacingVector(Human.Facing).X * 1.5f; if (!Human.OnGround) { Human.Velocity.Y += 1; } }
public ActionDash(EnemyHuman player, float dashStartTime, float dashTime, float dashEndTime, float dashFactor, bool phasing, bool reversed) : base(player) { DashStartTime = dashStartTime; DashTime = dashTime; DashEndTime = dashEndTime; DashFactor = dashFactor; Phasing = phasing; Reversed = reversed; }
public ChargeEffect(GameWorld world, Vector2 position, float angle, float time, EnemyHuman human) : base(world, position) { Angle = angle; FrameEnd = time; Human = human; Sound = Game.sfx_player_charging.Play(); Sound.Pitch = 0; Sound.Looping = true; }
public ActionDashAttack(EnemyHuman player, float dashStartTime, float dashTime, float dashEndTime, float dashFactor, bool phasing, bool reversed, ActionBase actionDashAttack) : base(player, dashStartTime, dashTime, dashEndTime, dashFactor, phasing, reversed) { DashStartTime = dashStartTime; DashTime = dashTime; DashEndTime = dashEndTime; DashFactor = dashFactor; Phasing = phasing; Reversed = reversed; DashAttack = actionDashAttack; }
public override void Shoot(EnemyHuman shooter, Vector2 position, Vector2 direction) { new SpellOrange(shooter.World, position) { Velocity = direction * 3, FrameEnd = 70, Shooter = shooter }; PlaySFX(sfx_wand_orange_cast, 1.0f, 0.1f, 0.3f); }
public override void OnAttack(ActionBase action, RectangleF hitmask) { if (FireballReady) { EnemyHuman attacker = action.Human; for (int i = -1; i <= 1; i++) { var time = Random.NextFloat() * 10; LastFireball = new FireballBig(attacker.World, hitmask.Center + new Vector2(0, i * hitmask.Height / 2)) { Velocity = GetFacingVector(attacker.Facing) * 3, Shooter = attacker, FrameEnd = 30 + time, Frame = time, }; } FireballReady = false; } }
public ActionIdle(EnemyHuman player) : base(player) { }
public override WeaponState GetWeaponState(EnemyHuman human, float angle) { return(WeaponState.WandOrange(angle)); }
public override void Trigger(EnemyHuman human) { Scheduler.Instance.Run(new Coroutine(Teleport(human, Destination))); }
public ActionTransplantPunch(EnemyHuman human, float punchStartTime, float punchFinishTime, Weapon weapon) : base(human, punchStartTime, punchFinishTime, weapon) { }
public override void Trigger(EnemyHuman human) { //NOOP }
public IEnumerable <Wait> SlowBlast(EnemyHuman human) { yield return(new WaitDelta(World, 1)); human.AddStatusEffect(new Slow(human, 0.6f, 1000)); }
public abstract void Trigger(EnemyHuman human);
public ActionAttack(EnemyHuman player) : base(player) { }
public virtual void StepOn(EnemyHuman human) { //NOOP }