Пример #1
0
    public void InternalWait(InternalWaitCallback internalWaitCallback, float?seconds = null)
    {
        var waitOption = new WaitOption(internalWaitCallback, seconds);

        waitOption.WaitFunc = InternalWaitFunction(waitOption);
        _internalWaits.Enqueue(waitOption);
        StartCoroutine(waitOption.WaitFunc);
    }
Пример #2
0
 public void Debounce(InternalWaitCallback debounceWait, float?seconds = null)
 {
     if (seconds == null)
     {
         _waitOneFrameDebounce = true;
     }
     _debounceWait = debounceWait;
     StartCoroutine(DebounceFunction(seconds));
 }
Пример #3
0
 public WaitOption(InternalWaitCallback waitCallback, float?seconds)
 {
     WaitCallback = waitCallback;
     WaitOneFrame = !seconds.HasValue;
     if (WaitOneFrame == false)
     {
         Seconds = seconds.Value;
     }
 }
Пример #4
0
 public void InternalWait(InternalWaitCallback internalWait, float?seconds = null)
 {
     if (seconds == null)
     {
         _waitOneFrame = true;
     }
     else
     {
         _seconds = seconds.Value;
     }
     _internalWait = internalWait;
     StartCoroutine(InternalWaitFunction());
 }
Пример #5
0
 public void ClearWait()
 {
     _internalWait = null;
 }