예제 #1
0
        public Schedulable <T> AddCoroutine(IScheduler scheduler, Func <IEnumerator> starter)
        {
            var func        = CoroutineFunctor.Create(() => default(T), _ => starter());
            var schedulable = new Schedulable <T>(scheduler, func);

            AddChild(schedulable);
            return(schedulable);
        }
예제 #2
0
        public Schedulable <T> ContinueWithCoroutine(IScheduler scheduler, Func <IEnumerator> starter)
        {
            if (Parent == null)
            {
                throw new NoParentException();
            }

            var func        = CoroutineFunctor.Create(() => default(T), _ => starter());
            var schedulable = new Schedulable <T>(scheduler, func);

            Parent.AddChild(schedulable);
            return(schedulable);
        }