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); }
public void SearchNewPath(NodeTD[] nodeGraph) { PathFinder.GetPath(startN, endN, nodeGraph, this.SetPath); }