Beispiel #1
0
    // Use this for initialization
    void Start()
    {
        Debug.Log("********************************* DEPTHWISE");
        List <Node> path = Pathfinding.DepthwiseSearch(start, end);

        for (int i = 0; i < path.Count; i++)
        {
            Debug.Log(path [i].transform.name);
        }



        Debug.Log("********************************* BREADTHWISE");

        path = Pathfinding.BreadthwiseSearch(start, end);
        for (int i = 0; i < path.Count; i++)
        {
            Debug.Log(path [i].transform.name);
        }



        Debug.Log("********************************* A*");

        path = Pathfinding.AStar(start, end);
        for (int i = 0; i < path.Count; i++)
        {
            Debug.Log(path [i].transform.name);
        }

        myPath      = new List <Node> (path);
        currentNode = 0;
    }