Exemple #1
0
    //Starts the processing of a path request
    public static void RequestPath(Vector3 beginPath, Vector3 endPath, Action <Vector3[], bool> callback)
    {
        PathRequests newRequest = new PathRequests(beginPath, endPath, callback);

        instance.pathRequestQueue.Enqueue(newRequest);
        instance.ProcessNext();
    }
 void ProcessNext()
 {
     if (!isProcessing && pathRequestQueue.Count>0)
     {
         currentRequest = pathRequestQueue.Dequeue();
         isProcessing = true;
         a.StartFindPath(currentRequest.beginPath,currentRequest.endPath);
     }
 }
Exemple #3
0
 void ProcessNext()
 {
     if (!isProcessing && pathRequestQueue.Count > 0)
     {
         currentRequest = pathRequestQueue.Dequeue();
         isProcessing   = true;
         a.StartFindPath(currentRequest.beginPath, currentRequest.endPath);
     }
 }
 //Starts the processing of a path request
 public static void RequestPath(Vector3 beginPath, Vector3 endPath, Action<Vector3[], bool> callback)
 {
     PathRequests newRequest = new PathRequests(beginPath,endPath,callback);
     instance.pathRequestQueue.Enqueue(newRequest);
     instance.ProcessNext();
 }