/// <summary> /// Resets the algorithm for a new location. /// </summary> private void Reset(Vector2Int start, Vector2Int goal) { //Creates an heap the size of the map m_heap = new MinHeap(Map.GetSize()); Map.Reset(); m_goal = goal; Start = start; m_previousStart = Start; Map.GetNode(m_goal).Rhs = 0; m_heap.Insert(m_goal, CalculatePriority(m_goal)); m_travelledDistance = 0; }