public static void WaitThen(float waitSecond, Action then) { if (waitSecond < 0.015f) { then(); } else { using (Corout.OpenFence()) Corout.Create(Corout.IEWait(Scheduler.Instance.Second + waitSecond)).OnFinally(co => then()).Start(); } }
public static void WaitThen(int waitStep, Action then) { if (waitStep <= 0) { then(); } else { using (Corout.OpenFence()) Corout.Create(Corout.IEWait(waitStep - 1)).OnFinally(co => then()).Start(); } }