Process() public method

public Process ( IEnumerator process ) : IEnumerator
process IEnumerator
return IEnumerator
 public void Start()
 {
     processor = new AsyncProcessor();
     processor.Process(Coroutine1());
     processor.Process(GetExample1());
     processor.Process(GetExample2());
 }
 public void Start()
 {
     processor = new AsyncProcessor();
     processor.Process(Coroutine1());
     processor.Process(GetExample1());
     processor.Process(GetExample2());
 }
示例#3
0
    public void TestRunForSeconds()
    {
        _asyncHandler.Process(RunFor1Second());

        var start = Time.realtimeSinceStartup;

        RunProcessesToEnd();

        Assert.That((Time.realtimeSinceStartup - start) >= 1);
    }
示例#4
0
 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());
     }
 }
示例#5
0
 public void Initialize(Color color, float radius, AsyncProcessor asyncProcessor)
 {
     if (asyncProcessor != null)
     {
         asyncProcessor.Process(() => AsyncInitialize(color, radius));
     }
     else
     {
         Initialize(color, radius);
     }
 }
示例#6
0
 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);
     }
 }
示例#7
0
 public void ChangeState(State nextState)
 {
     processor.Process(Transit(nextState));
 }