/// <summary> /// Adds a Poison Cloud status animation linked to the Entity's position. /// </summary> /// <param name="statusAnims">The Entity's list of Status Animations.</param> /// <param name="pos">The Entity's position.</param> private void HandlePoisonEffect(CStatusAnimations statusAnims, CPosition pos) { CStatusAnimation newStatusAnim; Bitmap bmp; Animation anim; AnimationScript animScript; float xOffset; float yOffset; if (pos.Width <= 21) { bmp = SwinGame.BitmapNamed("SmallPoisonCloud"); } else { bmp = SwinGame.BitmapNamed("BigPoisonCloud"); } xOffset = (pos.Width / 2) - (bmp.CellWidth / 2); yOffset = 0; anim = SwinGame.CreateAnimation("Poison", SwinGame.AnimationScriptNamed("PoisonZoneAnim")); animScript = SwinGame.AnimationScriptNamed("PoisonZoneAnim"); newStatusAnim = new CStatusAnimation(typeof(CPoison), xOffset, yOffset, bmp, anim, animScript); statusAnims.Anims.Add(newStatusAnim); }
/// <summary> /// Adds an Ice Spike status animation linked to the Entity's position. /// </summary> /// <param name="statusAnims">The Entity's list of Status Animations.</param> /// <param name="pos">The Entity's position.</param> private void HandleFreezeEffect(CStatusAnimations statusAnims, CPosition pos) { CStatusAnimation newStatusAnim; Bitmap bmp; Animation anim; AnimationScript animScript; float xOffset; float yOffset; if (pos.Width <= 21) { bmp = SwinGame.BitmapNamed("SmallIceSpike"); } else { bmp = SwinGame.BitmapNamed("BigIceSpike"); } xOffset = (pos.Width / 2) - (bmp.CellWidth / 2); yOffset = pos.Height - bmp.CellHeight; anim = SwinGame.CreateAnimation("Freeze", SwinGame.AnimationScriptNamed("IceSpikeAnim")); animScript = SwinGame.AnimationScriptNamed("IceSpikeAnim"); newStatusAnim = new CStatusAnimation(typeof(CFrozen), xOffset, yOffset, bmp, anim, animScript); statusAnims.Anims.Add(newStatusAnim); }