Example #1
0
 public void after(Duration duration, Action act) =>
 ASync.WithDelay(duration.seconds, act);
Example #2
0
 public void afterXFrames(int framesToSkip, Action act) =>
 ASync.AfterXFrames(framesToSkip, act);
Example #3
0
 public static Future <A> delayFrames <A>(int framesToSkip, Fn <A> createValue) =>
 a <A>(p => ASync.AfterXFrames(framesToSkip, () => p.complete(createValue())));
Example #4
0
 public static Future <A> delayFrames <A>(int framesToSkip, A value) =>
 a <A>(p => ASync.AfterXFrames(framesToSkip, () => p.complete(value)));
Example #5
0
 public static Future <Unit> fromCoroutine(IEnumerator enumerator) =>
 fromCoroutine(ASync.StartCoroutine(enumerator));
Example #6
0
 public static Future <A> fromBusyLoop <A>(
     Fn <Option <A> > checker, YieldInstruction delay = null
     )
 {
     return(Future <A> .async(p => ASync.StartCoroutine(busyLoopEnum(delay, p, checker))));
 }
Example #7
0
 public static Future <A> delay <A>(float seconds, Fn <A> createValue)
 {
     return(a <A>(p => ASync.WithDelay(seconds, () => p.complete(createValue()))));
 }
Example #8
0
 public static Future <A> delay <A>(float seconds, A value)
 {
     return(a <A>(p => ASync.WithDelay(seconds, () => p.complete(value))));
 }
Example #9
0
        static IEnumerator coroutineEnum(Promise <Unit> p, IEnumerator enumerator)
        {
            yield return(ASync.StartCoroutine(enumerator));

            p.complete(Unit.instance);
        }
Example #10
0
 public static Future <Unit> fromCoroutine(IEnumerator enumerator)
 {
     return(Future <Unit> .async(p => ASync.StartCoroutine(coroutineEnum(p, enumerator))));
 }
Example #11
0
 public Coroutine after(Duration duration, Action act, string name) =>
 ASync.WithDelay(duration, act, behaviour: behaviour.orNull(), timeContext: this);
Example #12
0
 public Coroutine after(Duration duration, Action act, string name = null) =>
 ASync.WithDelay(duration, act, timeContext: this);
Example #13
0
 public Coroutine after(Duration duration, Action act, string name) =>
 ASync.WithDelay(duration.seconds, act, behaviour: behaviour.orNull(), timeScale: timeScale);