SoletekForce/Pathfinding/PathSearch.cs
/// <summary>
/// Continues a existing search based on new criteria
/// </summary>
/// <param name="depthIncrement">Depth increment.</param>
/// <param name="targetLimit">Target limit.</param>
/// <param name="checkFunction">Check function.</param>
/// <param name="resetFrontier">If set to <c>true</c> reset the frontier to all cells with data.</param>
Continues a existing search based on new criteria
Continues a existing search based on new criteria
public void Expand(int depthIncrement, IPathfindNode targetLimit = null, 
		                   CellBlockingDelegate checkFunction = null, bool resetFrontier = false)
		{
			TargetFound = false;
			if (resetFrontier || frontier.Count == 0)
			{
				frontier.Clear();
				foreach (var cell in map.AllNodes())
				{
					if (cell.Node.data != -1)
					{
						frontier.Enqueue(cell.Node);
					}
				}
			}
			depthLimit = depth + depthIncrement;
			this.targetLimit = targetLimit;
			SetBlockingDelegate(checkFunction);
			BreathFirstSearch();
		}
public void Expand ( int depthIncrement , IPathfindNode targetLimit = null , CellBlockingDelegate checkFunction = null , bool resetFrontier = false ) { TargetFound = false ; if ( resetFrontier || frontier . Count == 0 ) { frontier . Clear ( ) ; foreach ( var cell in map . AllNodes ( ) ) { if ( cell . Node . data != - 1 ) { frontier . Enqueue ( cell . Node ) ; } } } depthLimit = depth + depthIncrement ; this . targetLimit = targetLimit ; SetBlockingDelegate ( checkFunction ) ; BreathFirstSearch ( ) ; }
Continues a existing search based on new criteria
Continues a existing search based on new criteria
depthIncrement
int
None
targetLimit
IPathfindNode
None
checkFunction
CellBlockingDelegate
None
resetFrontier
bool
If set to true
If set to true