public void Start() { processor = new AsyncProcessor(); processor.Process(Coroutine1()); processor.Process(GetExample1()); processor.Process(GetExample2()); }
public void TestRunForSeconds() { _asyncHandler.Process(RunFor1Second()); var start = Time.realtimeSinceStartup; RunProcessesToEnd(); Assert.That((Time.realtimeSinceStartup - start) >= 1); }
public void Initialize(Color sunColor, Vector3 sunPosition, float sunRadius, float planetRadius, AsyncProcessor asyncProcessor) { if (asyncProcessor != null) { asyncProcessor.Process(() => InitializeAsync(sunPosition, sunColor, sunRadius, planetRadius)); } else { Initialize(sunColor, sunPosition, sunRadius, planetRadius, new System.Random()); } }
public void Initialize(Color color, float radius, AsyncProcessor asyncProcessor) { if (asyncProcessor != null) { asyncProcessor.Process(() => AsyncInitialize(color, radius)); } else { Initialize(color, radius); } }
public void Initialize(SunBehaviour sun, Vector3 axis, float radius, AsyncProcessor asyncProcessor) { if (asyncProcessor != null) { asyncProcessor.Process(() => AsyncInitialize(sun, axis, radius)); } else { Initialize(sun, axis, radius); } }
public void ChangeState(State nextState) { processor.Process(Transit(nextState)); }