public static List <T> search <T>(IUnweightedGraph <T> graph, T start, T goal)
        {
            Dictionary <T, T> cameFrom;
            var foundPath = search(graph, start, goal, out cameFrom);

            return(foundPath ? AStarPathfinder.recontructPath(cameFrom, start, goal) : null);
        }
Пример #2
0
 /// <summary>
 /// convenience shortcut for calling AStarPathfinder.search
 /// </summary>
 /// <param name="start">Start.</param>
 /// <param name="goal">Goal.</param>
 public List <Vector2> search(Vector2 start, Vector2 goal)
 {
     return(AStarPathfinder.search(this, start, goal));
 }