예제 #1
0
 public void StartWaitTimer()
 {
     WaitTimerStarted?.Invoke(this, Delay);
     WaitTimer          = new System.Timers.Timer(1000);
     WaitCount          = Delay;
     WaitTimer.Elapsed += WaitTimer_Elapsed;
     WaitTimerUpdate?.Invoke(this, WaitCount);
     WaitTimer.Start();
 }
예제 #2
0
 private void WaitTimer_Elapsed(object sender, ElapsedEventArgs e)
 {
     WaitCount--;
     if (WaitCount <= 0)
     {
         WaitCount = 0;
         WaitTimer.Stop();
         WaitTimerDone?.Invoke(this, new EventArgs());
     }
     WaitTimerUpdate?.Invoke(this, WaitCount);
 }
예제 #3
0
 private void ScriptFSM_WaitTimerUpdate(object sender, int e)
 {
     WaitTimerUpdate?.Invoke(sender, e);
 }