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); }
public AwcAwaiter(T task, IAwcTaskQueue <T> queue) { this.task = task; this.queue = queue; queue.AddPending(task, out index); }