//! Create A* path. public ja2.TerrainTile[] CreatePath(TerrainManager TerrainManager_, ja2.TerrainTile From, ja2.TerrainTile To) { lastPath = new ja2.AStarPathMap(TerrainManager_, From, To); while (lastPath.RunOnce() == ja2.AStarPathMap.State.WAIT) { ; } return(lastPath.Path()); }
public System.Collections.IEnumerator CreatePathDebug_CoRo(TerrainManager TerrainManager_, ja2.TerrainTile From, ja2.TerrainTile To) { lastPath = new ja2.AStarPathMap(TerrainManager_, From, To); ja2.AStarPathMap.State state; do { yield return(new WaitForSeconds(time)); state = lastPath.RunOnce(); } while (state == ja2.AStarPathMap.State.WAIT); }