Ejemplo n.º 1
0
 public CoroutineService(IEventRoutingService eventRoutingService)
 {
     Runtime            = new AwcScriptRuntime();
     waitUpdatesQueue   = Runtime.GetQueue <AwcWaitUpdatesTask>();
     waitSecondsQueue   = Runtime.GetQueue <AwcWaitSecondsTask>();
     waitConditionQueue = Runtime.GetQueue <AwcWaitConditionTask>();
     eventRoutingService.Subscribe <INewFrameEvent>(typeof(ICoroutineService), nameof(OnNewFrameEvent), OnNewFrameEvent);
 }
Ejemplo n.º 2
0
 public AwcAwaiter(T task, IAwcTaskQueue <T> queue)
 {
     this.task  = task;
     this.queue = queue;
     queue.AddPending(task, out index);
 }