August 2018
Beginner
334 pages
10h 19m
English
Even though this recipe is only for defining a function, please take into consideration the comments in the code for a better understanding of the implementation and code flow:
public List<Vertex> path; public bool isFinished;
public IEnumerator GetPathInFrames(GameObject srcObj, GameObject dstObj, Heuristic h = null)
{
//next steps
}
isFinished = false;
path = new List<Vertex>();
if (srcObj == null || dstObj == null)
{
path = new List<Vertex>();
isFinished = true;
yield break;
}
Read now
Unlock full access