// Ctor : provides specific cells and mode (combat or not) public PathFinder(IMapContext map, IEnumerable<Cell> cells, bool fight) { _map = map; _isInFight = fight; _cells = new CellInfo[_map.Cells.Count]; foreach (Cell cell in cells) _cells[cell.Id] = new CellInfo(cell); PathPacker = new MapMovement(_cells); }
// Ctor : provides Map and mode (combat or not). Beware, use a Fight context un fight, and a Map out of fights public PathFinder(IMapContext map, bool fight) { Debug.Assert(fight && map is Fight || !fight && map is IMap); _isInFight = fight; _map = map; _cells = new CellInfo[map.Cells.Count]; for (int i = 0; i < map.Cells.Count; i++) _cells[i] = new CellInfo(map.Cells[i]); PathPacker = new MapMovement(_cells); }
// Ctor : provides specific cells and mode (combat or not) public PathFinder(IMapContext map, IEnumerable <Cell> cells, bool fight) { _map = map; _isInFight = fight; _cells = new CellInfo[_map.Cells.Count]; foreach (Cell cell in cells) { _cells[cell.Id] = new CellInfo(cell); } PathPacker = new MapMovement(_cells); }
// Ctor : provides Map and mode (combat or not). Beware, use a Fight context un fight, and a Map out of fights public PathFinder(IMapContext map, bool fight) { Debug.Assert(fight && map is Fight || !fight && map is IMap); _isInFight = fight; _map = map; _cells = new CellInfo[map.Cells.Count]; for (int i = 0; i < map.Cells.Count; i++) { _cells[i] = new CellInfo(map.Cells[i]); } PathPacker = new MapMovement(_cells); }