Example #1
0
    public static void requestRoute(Vector3 routeStart, Vector3 routeEnd, Action <Vector3[], bool> recall)
    {
        RouteReqeust newRequest = new RouteReqeust(routeStart, routeEnd, recall);

        now.routeRequest.Enqueue(newRequest);
        now.TryProcessNext();
    }
Example #2
0
 void TryProcessNext()
 {
     if (!routeProcessing && routeRequest.Count > 0)
     {
         currentRouteRequest = routeRequest.Dequeue();
         routeProcessing     = true;
         route.startFind(currentRouteRequest.routeStart, currentRouteRequest.routeEnd);
     }
 }