Пример #1
0
 public void DoCycle()
 {
     if (IsComplete)
     {
         //Do nothing
     }
     else if (currentConditional == null || currentConditional.Process())
     {
         //current conditional can be null if you use yield return null; basically acts as a single cycle skip
         IsComplete         = !coroutine.MoveNext();
         currentConditional = coroutine.Current;
     }
 }
Пример #2
0
 //CoroutineReturn startable;
 /// <summary>
 /// Used to create a coroutine, must be created
 /// </summary>
 /// <param name="coroutine"></param>
 internal Coroutine(IEnumerator <Yielder> coroutine)
 {
     this.coroutine     = coroutine;
     currentConditional = coroutine.Current;
     //startable = null;
 }