Example #1
0
 public void addLocalRoutines()
 {
     Local            = new ProcessorCoroutines();
     Local.timescaled = timescaled;
     Local.period     = period;
     Local.accum      = period;
     ProcessorCoroutines.coroutine_handlers.Add(Local);
 }
Example #2
0
        public static void init()
        {
            Local  = new ProcessorCoroutines();
            Global = new ProcessorCoroutines();

            Local.timescaled  = true;
            Global.timescaled = true;

            Local.period  = -1;
            Global.period = -1;

            ProcessorCoroutines.coroutine_handlers.Add(Local);
            ProcessorCoroutines.coroutine_handlers_global.Add(Global);
        }
Example #3
0
 /// <summary>
 /// Construct a coroutine. Never call this manually, only use return values from Coroutines.Run().
 /// </summary>
 /// <param name="processorCoroutines">The routine's runner.</param>
 /// <param name="enumerator">The routine's enumerator.</param>
 public coroutine(ProcessorCoroutines processorCoroutines, IEnumerator enumerator)
 {
     this.processorCoroutines = processorCoroutines;
     this.enumerator          = enumerator;
 }