public void updateMap(int level, Point point, PathingTerrain newTerrain) { if (levelTCODMaps.Count() == 0) { LogFile.Log.LogEntryDebug("updateMap called before pathfinding initially done.", LogDebugLevel.Medium); return; } switch (newTerrain) { case PathingTerrain.ClosedLock: levelTCODMaps[level].SetCell(point.x, point.y, true, false); levelTCODMapsIgnoringClosedDoors[level].SetCell(point.x, point.y, true, false); levelTCODMapsIgnoringClosedDoorsAndLocks[level].SetCell(point.x, point.y, true, true); break; case PathingTerrain.ClosedDoor: levelTCODMaps[level].SetCell(point.x, point.y, true, false); levelTCODMapsIgnoringClosedDoors[level].SetCell(point.x, point.y, true, true); levelTCODMapsIgnoringClosedDoorsAndLocks[level].SetCell(point.x, point.y, true, true); break; case PathingTerrain.Unwalkable: levelTCODMaps[level].SetCell(point.x, point.y, true, false); levelTCODMapsIgnoringClosedDoors[level].SetCell(point.x, point.y, true, false); levelTCODMapsIgnoringClosedDoorsAndLocks[level].SetCell(point.x, point.y, true, false); break; case PathingTerrain.Walkable: levelTCODMaps[level].SetCell(point.x, point.y, true, true); levelTCODMapsIgnoringClosedDoors[level].SetCell(point.x, point.y, true, true); levelTCODMapsIgnoringClosedDoorsAndLocks[level].SetCell(point.x, point.y, true, true); break; } }
public void updateMap(int level, Point point, PathingTerrain newTerrain) { if (levelTCODMaps.Count() == 0) { LogFile.Log.LogEntryDebug("updateMap called before pathfinding initially done.", LogDebugLevel.Medium); return; } switch (newTerrain) { case PathingTerrain.ClosedLock: levelTCODMaps[level].SetCell(point.x, point.y, true, false); levelTCODMapsIgnoringClosedDoors[level].SetCell(point.x, point.y, true, false); levelTCODMapsIgnoringClosedDoorsAndLocks[level].SetCell(point.x, point.y, true, true); break; case PathingTerrain.ClosedDoor: levelTCODMaps[level].SetCell(point.x, point.y, true, false); levelTCODMapsIgnoringClosedDoors[level].SetCell(point.x, point.y, true, true); levelTCODMapsIgnoringClosedDoorsAndLocks[level].SetCell(point.x, point.y, true, true); break; case PathingTerrain.Unwalkable: levelTCODMaps[level].SetCell(point.x, point.y, true, false); levelTCODMapsIgnoringClosedDoors[level].SetCell(point.x, point.y, true, false); levelTCODMapsIgnoringClosedDoorsAndLocks[level].SetCell(point.x, point.y, true, false); break; case PathingTerrain.Walkable: levelTCODMaps[level].SetCell(point.x, point.y, true, true); levelTCODMapsIgnoringClosedDoors[level].SetCell(point.x, point.y, true, true); levelTCODMapsIgnoringClosedDoorsAndLocks[level].SetCell(point.x, point.y, true, true); break; } }
private bool CountsAsWalkable(PathingTerrain terrain) { return(terrain == PathingTerrain.Walkable || terrain == PathingTerrain.ClosedDoor); }
private bool CountsAsWalkable(PathingTerrain terrain) { return terrain == PathingTerrain.Walkable || terrain == PathingTerrain.ClosedDoor; }