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); }
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); }