示例#1
0
 public void InvokeTimerStopped()
 {
     System.Windows.Application.Current.Dispatcher.Invoke(delegate()
     {
         OnTimerStopped.Invoke();
     });
 }
 public void StopTimer()
 {
     _isPaused  = true;
     _timerIsOn = false;
     StopCoroutine(_coroutine);
     OnTimerStopped?.Invoke(GetGameTime());
 }
示例#3
0
 public void Stop()
 {
     if (!isStart)
     {
         return;
     }
     isStart = false;
     OnTimerStopped?.Invoke();
 }
示例#4
0
    public void StopTimer()
    {
        if (timerRoutine == null)
        {
            return;
        }

        StopCoroutine(timerRoutine);
        timerRoutine = null;
        OnTimerStopped?.Invoke(this);
    }
示例#5
0
    private IEnumerator RunTimer()
    {
        OnTimerStarted?.Invoke(this);
        while (timeLeft > 0)
        {
            yield return(null);

            SetTimeLeft(timeLeft - Time.deltaTime);
        }
        OnTimerStopped?.Invoke(this);
        OnTimerFinished?.Invoke(this);
    }
示例#6
0
 private void StopTON()
 {
     OnTimerStopped?.Invoke();
     timer?.Stop();
 }