Pathfinding.ConstantPath.Initialize C# (CSharp) Method

Initialize() public method

public Initialize ( ) : void
return void
		public override void Initialize () {
			
			PathNode startRNode = pathHandler.GetPathNode (startNode);
			startRNode.node = startNode;
			startRNode.pathID = pathHandler.PathID;
			startRNode.parent = null;
			startRNode.cost = 0;
			startRNode.G = GetTraversalCost (startNode);
			startRNode.H = CalculateHScore (startNode);

			startNode.Open (this,startRNode,pathHandler);
			
			searchedNodes++;
			
			startRNode.flag1 = true;
			allNodes.Add (startNode);
			
			//any nodes left to search?
			if (pathHandler.HeapEmpty ()) {
				CompleteState = PathCompleteState.Complete;
				return;
			}
			
			currentR = pathHandler.PopNode ();
		}