private void AddMultipleFrameAnimation(string p_animName, TilesetManager.ProjectileTileSet p_tile, int p_frameCount, float p_frameDuration = 0.2f) { AnimationsList.Add(new Animation(p_animName)); for (int i = 0; i < p_frameCount; i++) { AnimationsList[AnimationsList.Count - 1].FramesList.Add(new AnimationFrame(p_tile + i, p_frameDuration)); } }
private void AddAllDirectionAnimation(TilesetManager.ProjectileTileSet p_tile, float p_frameDuration = 0.2f) { AnimationsList.Add(new Animation("Right")); AnimationsList[AnimationsList.Count - 1].FramesList.Add(new AnimationFrame(p_tile, p_frameDuration)); AnimationsList.Add(new Animation("Up")); AnimationsList[AnimationsList.Count - 1].FramesList.Add(new AnimationFrame(p_tile + 1, p_frameDuration)); AnimationsList.Add(new Animation("Left")); AnimationsList[AnimationsList.Count - 1].FramesList.Add(new AnimationFrame(p_tile + 2, p_frameDuration)); AnimationsList.Add(new Animation("Down")); AnimationsList[AnimationsList.Count - 1].FramesList.Add(new AnimationFrame(p_tile + 3, p_frameDuration)); }
private void AddTwoFrameAnimation(string p_animName, TilesetManager.PlayerTileSet p_tile, float p_frameDuration = 0.2f) { AnimationsList.Add(new Animation(p_animName)); AnimationsList[AnimationsList.Count - 1].FramesList.Add(new AnimationFrame(p_tile, p_frameDuration)); AnimationsList[AnimationsList.Count - 1].FramesList.Add(new AnimationFrame(p_tile + 1, p_frameDuration)); }