public static ICorutine Call(params object[] arr) { var cr = new CorutineTask(); foreach (var a in arr) { if (a is ICorutine) { cr.Add(a as ICorutine); } else if (a is IEnumerable <ICorutine> ) { cr.Add(a as IEnumerable <ICorutine>); } } return(cr); }
private void Run() { var cr = new CorutineTask(); cr.Add(crRun()); while (cr.MoveNext()) { } }