Beispiel #1
0
        public Path(BattleTile start, BattleTile target, HexMap map, BattleWindow window)
        {
            this.window = window;

            tiles = map.GetTilesFromPoints(AStar.FindPath(map, start.coord, target.coord, false));

            window.DrawPath(this);
        }
Beispiel #2
0
        public virtual void Move(Path path)
        {
            var p = battlePosition;

            for (int i = 1; i < path.Length; i++)
            {
                if (ap >= ((BattleTile)path[i]).GetEnterCost())
                {
                    battlePosition.Leave();
                    ((BattleTile)path[i]).Enter(this);
                    battlePosition = (BattleTile)path[i];
                    ap            -= ((BattleTile)path[i]).GetEnterCost();
                    Moved(this, new MoveEventArgs((BattleTile)path[i]));
                }
            }
        }
Beispiel #3
0
 public MoveEventArgs(BattleTile tile)
 {
     target = tile;
 }
Beispiel #4
0
 public virtual void EngageBattle(BattleTile position)
 {
     GetReadyForBattle();
     this.battlePosition = position;
     this.battlePosition.Enter(this);
 }