示例#1
0
 public void TimerEnd()
 {
     if (IEnded != null)
     {
         IEnded.Invoke();
     }
 }
示例#2
0
 public void InvokeTimerStarted()
 {
     System.Windows.Application.Current.Dispatcher.Invoke(delegate()
     {
         OnTimerStarted?.Invoke();
     });
 }
    IEnumerator Start()
    {
        m_HalfTime = m_Duration / 2;
        OnTimerStarted?.Invoke();
        yield return(StartCoroutine(WaitAndPrint(1.0F)));

        OnTimerEnded?.Invoke();
    }
示例#4
0
 public void StartTimer()
 {
     AllowedToGo = true;
     if (IStarted != null)
     {
         IStarted.Invoke();
     }
 }
示例#5
0
 public void StopTimer()
 {
     AllowedToGo    = false;
     timerText.text = "";
     if (IStopped != null)
     {
         IStopped.Invoke();
     }
 }
 public void StartTimer()
 {
     _timer     = 0;
     _timerIsOn = true;
     OnTimerStarted?.Invoke(GetGameTime());
     OnNewMonth?.Invoke(GetGameTime());
     OnNewYear?.Invoke(GetGameTime());
     _coroutine = StartCoroutine(NextTime());
 }
示例#7
0
        private IEnumerator Start()
        {
            _halfTime = _duration / 2;
            OnTimerStarted?.Invoke();

            yield return(StartCoroutine(WaitAndPrint(1.0f)));

            OnTimerEnded?.Invoke();
        }
示例#8
0
 public void ResetTimer()
 {
     StopTimer();
     CurrentTime    = TargetTime;
     timerText.text = "";
     if (IReset != null)
     {
         IReset.Invoke();
     }
 }
示例#9
0
    private IEnumerator RunTimer()
    {
        OnTimerStarted?.Invoke(this);
        while (timeLeft > 0)
        {
            yield return(null);

            SetTimeLeft(timeLeft - Time.deltaTime);
        }
        OnTimerStopped?.Invoke(this);
        OnTimerFinished?.Invoke(this);
    }
示例#10
0
 private void StartTON()
 {
     timer?.Start();
     OnTimerStarted?.Invoke();
 }