override protected void FinishSearch(IPath.Path foundPath, GameTile startPos, GameTile goalPos) { GameTile tile = goalPos; while (true) { if (tile == null || tile == startPos) { break; } foundPath.path.Push(tile); tile = blockStates.parentTile[(int)tile.num]; } }
abstract protected void FinishSearch(IPath.Path path, GameTile startPos, GameTile goalPos);
public IPath.SearchResult GetPath(Enemy owner, GameTile startPos, GameTile goalPos, IPath.Path path) { IPath.SearchResult result = InitSeatch(owner, startPos, goalPos); if (result == IPath.SearchResult.Ok || result == IPath.SearchResult.GoalOutOfRange) { FinishSearch(path, startPos, goalPos); } return(result); }