コード例 #1
0
 private void AddAllDirectionAnimation(TilesetManager.EnemyTileSet 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[AnimationsList.Count - 1].FramesList.Add(new AnimationFrame(p_tile + 1, p_frameDuration));
     AnimationsList.Add(new Animation("Up"));
     AnimationsList[AnimationsList.Count - 1].FramesList.Add(new AnimationFrame(p_tile + 2, p_frameDuration));
     AnimationsList[AnimationsList.Count - 1].FramesList.Add(new AnimationFrame(p_tile + 3, p_frameDuration));
     AnimationsList.Add(new Animation("Left"));
     AnimationsList[AnimationsList.Count - 1].FramesList.Add(new AnimationFrame(p_tile + 4, p_frameDuration));
     AnimationsList[AnimationsList.Count - 1].FramesList.Add(new AnimationFrame(p_tile + 5, p_frameDuration));
     AnimationsList.Add(new Animation("Down"));
     AnimationsList[AnimationsList.Count - 1].FramesList.Add(new AnimationFrame(p_tile + 6, p_frameDuration));
     AnimationsList[AnimationsList.Count - 1].FramesList.Add(new AnimationFrame(p_tile + 7, p_frameDuration));
 }
コード例 #2
0
 public AnimationFrame(TilesetManager.EnemyTileSet p_enemyTile, float p_duration = 0.2f)
 {
     frameType = TilesetManager.TileSetType.ENEMIES;
     enemyTile = p_enemyTile;
     duration  = p_duration;
 }
コード例 #3
0
 private void AddTwoFrameAnimation(string p_animName, TilesetManager.EnemyTileSet 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));
 }