public void InternalWait(InternalWaitCallback internalWaitCallback, float?seconds = null) { var waitOption = new WaitOption(internalWaitCallback, seconds); waitOption.WaitFunc = InternalWaitFunction(waitOption); _internalWaits.Enqueue(waitOption); StartCoroutine(waitOption.WaitFunc); }
public void Debounce(InternalWaitCallback debounceWait, float?seconds = null) { if (seconds == null) { _waitOneFrameDebounce = true; } _debounceWait = debounceWait; StartCoroutine(DebounceFunction(seconds)); }
public WaitOption(InternalWaitCallback waitCallback, float?seconds) { WaitCallback = waitCallback; WaitOneFrame = !seconds.HasValue; if (WaitOneFrame == false) { Seconds = seconds.Value; } }
public void InternalWait(InternalWaitCallback internalWait, float?seconds = null) { if (seconds == null) { _waitOneFrame = true; } else { _seconds = seconds.Value; } _internalWait = internalWait; StartCoroutine(InternalWaitFunction()); }
public void ClearWait() { _internalWait = null; }