public override void LoadAnimations() { base.LoadAnimations(); Texture2D spriteSheet = AssetManager.Instance.LoadRawTexture2D($"{ContentGlobals.SpriteRoot}/Enemies/Paratroopa.png"); AnimManager.SetSpriteSheet(spriteSheet); //The Paratroopa uses the same in shell animation as a Koopa Troopa for Shell Shot, but rotates itself differently AnimManager.AddAnimation(AnimationGlobals.ParatroopaBattleAnimations.ShellShotName, new Animation(spriteSheet, new Animation.Frame(new Rectangle(2, 222, 28, 25), 1000d))); LoopAnimation wingedIdle = new LoopAnimation(spriteSheet, AnimationGlobals.InfiniteLoop, new Animation.Frame(new Rectangle(56, 4, 32, 48), 100d), new Animation.Frame(new Rectangle(56, 4, 32, 48), 100d, new Vector2(0, -1)), new Animation.Frame(new Rectangle(56, 4, 32, 48), 100d, new Vector2(0, -2)), new Animation.Frame(new Rectangle(56, 4, 32, 48), 100d, new Vector2(0, -1))); //This animation uses the same rectangle for every frame. However, the wings are different on those frames and the //Paratroopa has varying heights on each frame AnimManager.AddAnimation(AnimationGlobals.WingedBattleAnimations.WingedIdleName, wingedIdle); wingedIdle.SetChildFrames( new Animation.Frame(new Rectangle(72, 156, 19, 27), 100d, new Vector2(19, -13)), new Animation.Frame(new Rectangle(104, 220, 23, 23), 100d, new Vector2(21, -8)), new Animation.Frame(new Rectangle(40, 219, 18, 28), 100d, new Vector2(19, 8)), new Animation.Frame(new Rectangle(248, 190, 21, 23), 100d, new Vector2(20, 1))); //NOTE: Incomplete wing frames; the wings on the left of the Paratroopa will require more work to get in due to the way the wings are stored //Same story with this one LoopAnimation flyingName = new LoopAnimation(spriteSheet, AnimationGlobals.InfiniteLoop, new Animation.Frame(new Rectangle(103, 4, 33, 51), 80d), new Animation.Frame(new Rectangle(103, 4, 33, 51), 80d, new Vector2(0, -1)), new Animation.Frame(new Rectangle(103, 4, 33, 51), 80d, new Vector2(0, -2)), new Animation.Frame(new Rectangle(103, 4, 33, 51), 80d, new Vector2(0, -1))); AnimManager.AddAnimation(AnimationGlobals.WingedBattleAnimations.FlyingName, flyingName); flyingName.SetChildFrames( new Animation.Frame(new Rectangle(72, 156, 19, 27), 80d, new Vector2(26, -4)), new Animation.Frame(new Rectangle(104, 220, 23, 23), 80d, new Vector2(26, 4)), new Animation.Frame(new Rectangle(40, 219, 18, 28), 80d, new Vector2(26, 16)), new Animation.Frame(new Rectangle(248, 190, 21, 23), 80d, new Vector2(26, 13))); Animation hurtName = new Animation(spriteSheet, new Animation.Frame(new Rectangle(5, 59, 39, 44), 250d), new Animation.Frame(new Rectangle(200, 3, 36, 43), 250d)); AnimManager.AddAnimation(AnimationGlobals.HurtName, hurtName); //NOTE: Not accurate - in PM, it looks like the wings are rotated slightly to match the Paratroopa's pose in its hurt animation hurtName.SetChildFrames( new Animation.Frame(new Rectangle(66, 190, 45, 26), 250d, new Vector2(3, -6), -.01f), new Animation.Frame(new Rectangle(66, 190, 45, 26), 250d, new Vector2(3, -6), -.01f)); }
public override void LoadAnimations() { Texture2D spriteSheet = AssetManager.Instance.LoadRawTexture2D($"{ContentGlobals.SpriteRoot}/Enemies/SkyGuy.png"); AnimManager.SetSpriteSheet(spriteSheet); LoopAnimation idle = new LoopAnimation(null, AnimationGlobals.InfiniteLoop, new Animation.Frame(new Rectangle(117, 256, 34, 35), 200d), new Animation.Frame(new Rectangle(163, 263, 38, 37), 200d)); AnimManager.AddAnimation(AnimationGlobals.IdleName, idle); idle.SetChildFrames( new Animation.Frame(new Rectangle(13, 259, 2, 31), 200d, new Vector2(0, 18), -.0001f), new Animation.Frame(new Rectangle(13, 259, 2, 31), 200d, new Vector2(0, 19), -.0001f)); }
protected ActionSubMenu() : base(MenuTypes.Vertical) { BoxMenu = new TextBox(new Vector2(SpriteRenderer.Instance.WindowCenter.X, SpriteRenderer.Instance.WindowCenter.Y + 220f), new Vector2(320f, 80f), null); BoxMenu.SetText(string.Empty); Texture2D battleGFX = AssetManager.Instance.LoadRawTexture2D($"{ContentGlobals.BattleGFX}.png"); Rectangle rect = new Rectangle(743, 59, 15, 12); SelectionCursor = new LoopAnimation(battleGFX, AnimationGlobals.InfiniteLoop, true, new Animation.Frame(rect, 200d), new Animation.Frame(rect, 200d, new Vector2(1, 0))); HeaderImage = new NineSlicedTexture2D(battleGFX, new Rectangle(457, 812, 32, 16), 7, 6, 7, 9); MenuBG = new NineSlicedTexture2D(battleGFX, new Rectangle(485, 846, 16, 16), 8, 8, 8, 8); }
public override void LoadAnimations() { Texture2D spriteSheet = AssetManager.Instance.LoadRawTexture2D($"{ContentGlobals.SpriteRoot}/Enemies/Duplighost.png"); AnimManager.SetSpriteSheet(spriteSheet); AnimManager.AddAnimation(AnimationGlobals.IdleName, new LoopAnimation(null, AnimationGlobals.InfiniteLoop, new Animation.Frame(new Rectangle(4, 4, 51, 43), 110d), new Animation.Frame(new Rectangle(196, 101, 51, 42), 110d, new Vector2(0, 1)), new Animation.Frame(new Rectangle(260, 98, 50, 45), 110d, new Vector2(0, -1)), new Animation.Frame(new Rectangle(324, 97, 50, 46), 110d, new Vector2(0, -1)))); AnimManager.AddAnimation(AnimationGlobals.HurtName, new Animation(null, new Animation.Frame(new Rectangle(1, 151, 50, 40), 110d, new Vector2(0, 2)), new Animation.Frame(new Rectangle(65, 151, 51, 39), 110d, new Vector2(0, 2)))); AnimManager.AddAnimation(AnimationGlobals.DeathName, new Animation(null, new Animation.Frame(new Rectangle(1, 151, 50, 40), 300d, new Vector2(0, 2)))); AnimManager.AddAnimation(AnimationGlobals.RunningName, new ReverseAnimation(null, AnimationGlobals.InfiniteLoop, new Animation.Frame(new Rectangle(4, 98, 52, 45), 60d, new Vector2(0, -1)), new Animation.Frame(new Rectangle(68, 98, 51, 45), 60d, new Vector2(0, -1)), new Animation.Frame(new Rectangle(132, 100, 50, 43), 60d))); AnimManager.AddAnimation(AnimationGlobals.DuplighostBattleAnimations.HeadbuttStartName, new Animation(null, new Animation.Frame(new Rectangle(195, 149, 51, 42), 1000d, new Vector2(0, 1)))); AnimManager.AddAnimation(AnimationGlobals.DuplighostBattleAnimations.HeadbuttName, new LoopAnimation(null, AnimationGlobals.InfiniteLoop, new Animation.Frame(new Rectangle(5, 198, 47, 37), 110d, new Vector2(0, 3)), new Animation.Frame(new Rectangle(69, 197, 47, 39), 110d, new Vector2(0, 2)))); AnimManager.AddAnimation(AnimationGlobals.DuplighostBattleAnimations.DisguiseStartName, new Animation(null, new Animation.Frame(new Rectangle(67, 251, 52, 44), 110d), new Animation.Frame(new Rectangle(193, 244, 51, 51), 110d, new Vector2(0, -4)))); AnimManager.AddAnimation(AnimationGlobals.DuplighostBattleAnimations.DisguiseName, new LoopAnimation(null, 5, new Animation.Frame(new Rectangle(129, 247, 51, 48), 110d, new Vector2(0, -2)), new Animation.Frame(new Rectangle(257, 248, 51, 47), 110d, new Vector2(0, -2)))); //Use the same animation for Confused since Confused isn't in PM LoopAnimation dizzyAnim = new LoopAnimation(null, AnimationGlobals.InfiniteLoop, new Animation.Frame(new Rectangle(132, 198, 52, 41), 110d, new Vector2(0, 1)), new Animation.Frame(new Rectangle(196, 198, 52, 41), 110d, new Vector2(0, 1)), new Animation.Frame(new Rectangle(260, 198, 52, 41), 110d, new Vector2(0, 1)), new Animation.Frame(new Rectangle(324, 198, 52, 41), 110d, new Vector2(0, 1))); AnimManager.AddAnimation(AnimationGlobals.StatusBattleAnimations.DizzyName, dizzyAnim); AnimManager.AddAnimation(AnimationGlobals.StatusBattleAnimations.ConfusedName, dizzyAnim); }
public override void LoadAnimations() { base.LoadAnimations(); Texture2D spriteSheet = AssetManager.Instance.LoadRawTexture2D($"{ContentGlobals.SpriteRoot}/Enemies/Paragoomba.png"); AnimManager.SetSpriteSheet(spriteSheet); LoopAnimation wingedIdle = new LoopAnimation(spriteSheet, AnimationGlobals.InfiniteLoop, new Animation.Frame(new Rectangle(129, 45, 27, 28), 200d), new Animation.Frame(new Rectangle(1, 7, 27, 30), 200d, new Vector2(0, 1))); LoopAnimation flyingName = new LoopAnimation(spriteSheet, AnimationGlobals.InfiniteLoop, new Animation.Frame(new Rectangle(129, 45, 27, 28), 100d), new Animation.Frame(new Rectangle(1, 7, 27, 30), 100d)); Animation hurtName = new Animation(spriteSheet, new Animation.Frame(new Rectangle(97, 48, 29, 27), 80d), new Animation.Frame(new Rectangle(98, 89, 27, 26), 80d)); Animation deathName = new Animation(spriteSheet, new Animation.Frame(new Rectangle(98, 89, 27, 26), 300d)); Animation diveKickName = new Animation(spriteSheet, new Animation.Frame(new Rectangle(33, 89, 27, 30), 1000d)); AnimManager.AddAnimation(AnimationGlobals.WingedBattleAnimations.WingedIdleName, wingedIdle); AnimManager.AddAnimation(AnimationGlobals.WingedBattleAnimations.FlyingName, flyingName); AnimManager.AddAnimation(AnimationGlobals.HurtName, hurtName); AnimManager.AddAnimation(AnimationGlobals.DeathName, deathName); AnimManager.AddAnimation(AnimationGlobals.ParagoombaBattleAnimations.DiveKickName, diveKickName); //Wings are offset from the Paragoomba's body //Both Wings for each frame are in a single cropped texture //The wings are rendered underneath the Paragoomba's body wingedIdle.SetChildFrames( new Animation.Frame(new Rectangle(3, 166, 41, 18), 200d, new Vector2(0, -6), -.01f), new Animation.Frame(new Rectangle(50, 161, 41, 14), 200d, new Vector2(0, 6), -.01f)); flyingName.SetChildFrames( new Animation.Frame(new Rectangle(3, 166, 41, 18), 100d, new Vector2(0, -6), -.01f), new Animation.Frame(new Rectangle(50, 161, 41, 14), 100d, new Vector2(0, 6), -.01f)); hurtName.SetChildFrames( new Animation.Frame(new Rectangle(3, 166, 41, 18), 80d, new Vector2(3, -5), -.01f), new Animation.Frame(new Rectangle(3, 166, 41, 18), 80d, new Vector2(3, -5), -.01f)); deathName.SetChildFrames(new Animation.Frame(new Rectangle(3, 166, 41, 18), 100d, new Vector2(3, -5), -.01f)); diveKickName.SetChildFrames(new Animation.Frame(new Rectangle(120, 121, 31, 21), 1000d, new Vector2(1, -13), -.01f)); }
public override void LoadAnimations() { //15 frame color change normal, 6 frame color change faster //2 frame spark change for normal and faster //Bomb starts brown, turns red 1 frame after fully stopping, then starts the spark //Spark order is red, orange, grey. It cycles back to red after grey Texture2D spriteSheet = AssetManager.Instance.LoadRawTexture2D($"{ContentGlobals.SpriteRoot}/Neutral/BobberyBomb.png"); double bombFrameRate = (1d / 15d) * 1000d; double sparkFrameRate = (1d / 30d) * 1000d; AnimManager.AddAnimation(AnimationGlobals.IdleName, new LoopAnimation(spriteSheet, AnimationGlobals.InfiniteLoop, new Animation.Frame(new Rectangle(62, 1, 65, 68), bombFrameRate), new Animation.Frame(new Rectangle(62, 72, 65, 68), bombFrameRate))); SparkAnimation = new LoopAnimation(spriteSheet, AnimationGlobals.InfiniteLoop, new Animation.Frame(new Rectangle(0, 0, 32, 24), sparkFrameRate), new Animation.Frame(new Rectangle(0, 24, 32, 24), sparkFrameRate), new Animation.Frame(new Rectangle(0, 48, 32, 24), sparkFrameRate)); //Pause the spark animation until we're ready to play it SparkAnimation.Pause(); }
public BobberyBomb(int damage) : base(new Stats(0, 1, 0, damage, 0)) { Name = "Bobbery Bomb"; EntityType = EntityTypes.Neutral; //Explosions cause the bombs to detonate (only possible from other Bobbery Bombs in the actual games) EntityProperties.AddWeakness(Elements.Explosion, new WeaknessHolder(WeaknessTypes.KO, 0)); //Add the Untargetable property so the bombs cannot be targeted this.AddIntAdditionalProperty(AdditionalProperty.Untargetable, 1); //15 frame color change normal, 6 frame color change faster //2 frame spark change for normal and faster //Bomb starts brown, turns red 1 frame after fully stopping, then starts the spark //Spark order is red, orange, grey. It cycles back to red after grey Texture2D spriteSheet = AssetManager.Instance.LoadRawTexture2D($"{ContentGlobals.SpriteRoot}/Neutral/BobberyBomb.png"); double bombFrameRate = (1d / 15d) * 1000d; double sparkFrameRate = (1d / 30d) * 1000d; AnimManager.AddAnimation(AnimationGlobals.IdleName, new LoopAnimation(spriteSheet, AnimationGlobals.InfiniteLoop, new Animation.Frame(new Rectangle(62, 1, 65, 68), bombFrameRate), new Animation.Frame(new Rectangle(62, 72, 65, 68), bombFrameRate))); //Offset the spark animation so we can play it in the same position as the bombs Vector2 sparkOffset = new Vector2(16, -68 / 4); SparkAnimation = new LoopAnimation(spriteSheet, AnimationGlobals.InfiniteLoop, new Animation.Frame(new Rectangle(0, 0, 32, 24), sparkFrameRate, sparkOffset), new Animation.Frame(new Rectangle(0, 24, 32, 24), sparkFrameRate, sparkOffset), new Animation.Frame(new Rectangle(0, 48, 32, 24), sparkFrameRate, sparkOffset)); //Pause the spark animation until we're ready to play it SparkAnimation.Pause(); }
public Duplighost() : base(new Stats(23, 15, 0, 0, 0)) { Name = "Duplighost"; AIBehavior = new DuplighostAI(this); EntityProperties.AddStatusProperty(Enumerations.StatusTypes.Sleep, new StatusPropertyHolder(60, -1)); EntityProperties.AddStatusProperty(Enumerations.StatusTypes.Stop, new StatusPropertyHolder(80, -1)); EntityProperties.AddStatusProperty(Enumerations.StatusTypes.Dizzy, new StatusPropertyHolder(75, -1)); EntityProperties.AddStatusProperty(Enumerations.StatusTypes.DEFDown, new StatusPropertyHolder(100, 0)); EntityProperties.AddStatusProperty(Enumerations.StatusTypes.Poison, new StatusPropertyHolder(100, 0)); EntityProperties.AddStatusProperty(Enumerations.StatusTypes.Confused, new StatusPropertyHolder(100, 0)); EntityProperties.AddStatusProperty(Enumerations.StatusTypes.Fright, new StatusPropertyHolder(50, 0)); EntityProperties.AddStatusProperty(Enumerations.StatusTypes.Paralyzed, new StatusPropertyHolder(75, 1)); EntityProperties.AddStatusProperty(Enumerations.StatusTypes.Lifted, new StatusPropertyHolder(80, 0)); EntityProperties.AddStatusProperty(Enumerations.StatusTypes.Tiny, new StatusPropertyHolder(75, 0)); EntityProperties.AddStatusProperty(Enumerations.StatusTypes.Blown, new StatusPropertyHolder(70, 0)); Texture2D spriteSheet = AssetManager.Instance.LoadRawTexture2D($"{ContentGlobals.SpriteRoot}/Enemies/Duplighost.png"); AnimManager.SetSpriteSheet(spriteSheet); AnimManager.AddAnimation(AnimationGlobals.IdleName, new LoopAnimation(null, AnimationGlobals.InfiniteLoop, new Animation.Frame(new Rectangle(4, 4, 51, 43), 110d), new Animation.Frame(new Rectangle(196, 101, 51, 42), 110d, new Vector2(0, 1)), new Animation.Frame(new Rectangle(260, 98, 50, 45), 110d, new Vector2(0, -2)), new Animation.Frame(new Rectangle(324, 97, 50, 46), 110d, new Vector2(0, -3)))); AnimManager.AddAnimation(AnimationGlobals.HurtName, new Animation(null, new Animation.Frame(new Rectangle(1, 151, 50, 40), 110d), new Animation.Frame(new Rectangle(65, 151, 51, 39), 110d, new Vector2(0, 1)))); AnimManager.AddAnimation(AnimationGlobals.DeathName, new Animation(null, new Animation.Frame(new Rectangle(1, 151, 50, 40), 1000d))); AnimManager.AddAnimation(AnimationGlobals.RunningName, new ReverseAnimation(null, AnimationGlobals.InfiniteLoop, new Animation.Frame(new Rectangle(4, 98, 52, 45), 60d), new Animation.Frame(new Rectangle(68, 98, 51, 45), 60d), new Animation.Frame(new Rectangle(132, 100, 50, 43), 60d, new Vector2(0, 1)))); AnimManager.AddAnimation(AnimationGlobals.DuplighostBattleAnimations.HeadbuttStartName, new Animation(null, new Animation.Frame(new Rectangle(195, 149, 51, 42), 1000d))); AnimManager.AddAnimation(AnimationGlobals.DuplighostBattleAnimations.HeadbuttName, new LoopAnimation(null, AnimationGlobals.InfiniteLoop, new Animation.Frame(new Rectangle(5, 198, 47, 37), 110d), new Animation.Frame(new Rectangle(69, 197, 47, 39), 110d, new Vector2(0, 1)))); AnimManager.AddAnimation(AnimationGlobals.DuplighostBattleAnimations.DisguiseStartName, new Animation(null, new Animation.Frame(new Rectangle(67, 251, 52, 44), 110d), new Animation.Frame(new Rectangle(193, 244, 51, 51), 110d, new Vector2(0, -7)))); AnimManager.AddAnimation(AnimationGlobals.DuplighostBattleAnimations.DisguiseName, new LoopAnimation(null, AnimationGlobals.InfiniteLoop, new Animation.Frame(new Rectangle(129, 247, 51, 48), 110d), new Animation.Frame(new Rectangle(257, 248, 51, 47), 110d, new Vector2(0, 1)))); //Use the same animation for Confused since Confused isn't in PM LoopAnimation dizzyAnim = new LoopAnimation(null, AnimationGlobals.InfiniteLoop, new Animation.Frame(new Rectangle(132, 198, 52, 41), 110d), new Animation.Frame(new Rectangle(196, 198, 52, 41), 110d), new Animation.Frame(new Rectangle(260, 198, 52, 41), 110d), new Animation.Frame(new Rectangle(324, 198, 52, 41), 110d)); AnimManager.AddAnimation(AnimationGlobals.StatusBattleAnimations.DizzyName, dizzyAnim); AnimManager.AddAnimation(AnimationGlobals.StatusBattleAnimations.ConfusedName, dizzyAnim); //Copy animations into its original set OrigAnimations = new ObjAnimManager(this); Animation[] allAnims = AnimManager.GetAllAnimations(); for (int i = 0; i < allAnims.Length; i++) { Animation anim = allAnims[i]; OrigAnimations.AddAnimation(anim.Key, anim); } //Subscribe to its own StatusInflicted event StatusInflictedEvent -= OnStatusInflicted; StatusInflictedEvent += OnStatusInflicted; }