The AStar class is the actual implementation of the A* algorithm. This is where the magic happens. The code in the AStar.cs file looks like this:
using UnityEngine;using System.Collections;public class AStar{ public static PriorityQueue closedList; public static PriorityQueue openList; private static ArrayList CalculatePath(Node node) { ArrayList list = new ArrayList(); while (node != null) { list.Add(node); node = node.parent; } list.Reverse(); return list; } /// Calculate the estimated Heuristic cost to the goal private static float EstimateHeuristicCost(Node curNode, Node goalNode) { Vector3 vecCost = curNode.position - goalNode.position; return vecCost.magnitude; } // Find the path between start node ...