public static void PerformSearch(AStarTile startingPoint, AStarTile endingPoint) { //Assemble the tile representation of the wordl ms_instance.StartCoroutine(ms_instance.PerformAStarSearchCoroutine( startingPoint, endingPoint)); }
IEnumerator FindPath() { var graphMaker = FindObjectOfType <GraphMaker>(); var nodes = graphMaker.nodes; var edges = graphMaker.edges; List <Node> bestPath = new List <Node>(); yield return(aStarSearch.StartCoroutine(aStarSearch.Search(nodes, edges, startNode, endNode, bestPath))); path = bestPath; nextTarget = path[0]; seekBehaviour.targetTransform = nextTarget.transform; }