public void MyUpdate() { Debug.Log("A* is updating"); while (requestPath.Count > 0) { if (!isDoingPath) { IUsePathfinding actualRequest = requestPath.Dequeue(); SetInitialNode(actualRequest.GetInitialNode()); SeTFinalNode(actualRequest.GetFinalNode()); actualRequest.SetPath(GetPath()); } } }
public void AddRequester(IUsePathfinding requester) { requestPath.Enqueue(requester); }