private void AsyncPathProbe()
        {
            int probeSize = this.probeSize;

            pathProbeJob.Reset(null);
            for (int i = 0; i != brains.Count; i++)
            {
                ClampBrainIndex(ref nextPathProbeBrain);
                Navigator component = brains[nextPathProbeBrain].GetComponent <Navigator>();
                IncrementBrainIndex(ref nextPathProbeBrain);
                if ((UnityEngine.Object)component != (UnityEngine.Object)null)
                {
                    component.executePathProbeTaskAsync          = true;
                    component.PathProber.potentialCellsPerUpdate = this.probeSize;
                    component.pathProbeTask.Update();
                    pathProbeJob.Add(component.pathProbeTask);
                    if (pathProbeJob.Count == probeCount)
                    {
                        break;
                    }
                }
            }
            CPUBudget.Start(this);
            GlobalJobManager.Run(pathProbeJob);
            CPUBudget.End(this);
        }
Beispiel #2
0
 public void TriggerStart()
 {
     if (budget != null && FastTrackMod.GameRunning)
     {
         lock (CPU_BUDGET_LOCK) {
             CPUBudget.Start(budget);
         }
     }
     time.Restart();
 }