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); }
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])); } } }
public MoveEventArgs(BattleTile tile) { target = tile; }
public virtual void EngageBattle(BattleTile position) { GetReadyForBattle(); this.battlePosition = position; this.battlePosition.Enter(this); }