Ejemplo n.º 1
0
        void ResetSubPath(SubPath platformSubPath)
        {
            if (dummyT == null)
            {
                dummyT = new GameObject().transform;
            }

            Quaternion rot = Quaternion.LookRotation(subPath[subWaypointID] - thisT.position);

            dummyT.rotation = rot;
            dummyT.position = thisT.position;

            Vector3 pos    = dummyT.TransformPoint(0, 0, BuildManager.GetGridSize() / 2);
            NodeTD  startN = PathFinder.GetNearestNode(pos, platformSubPath.parentPlatform.GetNodeGraph());

            PathFinder.GetPath(startN, platformSubPath.endN, platformSubPath.parentPlatform.GetNodeGraph(), this.SetSubPath);
        }
Ejemplo n.º 2
0
 public void SearchNewPath(NodeTD[] nodeGraph)
 {
     PathFinder.GetPath(startN, endN, nodeGraph, this.SetPath);
 }