43 public void FindPath(T start, T end,
float minHeuristic,
int maxPositionsToCheck) {
45 throw new InvalidOperationException(
"Path not specified.");
48 throw new InvalidOperationException(
"AStar World not specified.");
51 throw new InvalidOperationException(
"AStar OpenStorage not specified.");
54 throw new InvalidOperationException(
"AStar ClosedStorage not specified.");
67 node3 = m_openHeap.Count > 0 ?
HeapDequeue() :
null;
69 || num >= maxPositionsToCheck) {
78 if (
World.IsGoal(node3.Position)) {
91 float num2 =
World.Cost(node3.Position, val);
92 if (num2 == 1f / 0f) {
95 float num3 = node3.G + num2;
96 float num4 =
World.Heuristic(val, end);
98 && (node2 ==
null || num4 < node2.H)) {
103 if (num3 < node4.G) {
105 node4.F = num3 + node4.H;
106 node4.PreviousPosition = node3.Position;
111 node4 =
NewNode(val, node3.Position, num3, num4);