Exemple #1
0
 private IEnumerator TimeCoroutine()
 {
     for (int time = _game.Duration; time > 0; time -= 1)
     {
         UpdateTimer?.Invoke(time);
         yield return(new WaitForSeconds(1));
     }
     _game.StopGame();
 }
Exemple #2
0
 /// <summary>
 /// invokes updatetimer
 /// </summary>
 public static void OnUpdateTimer(int timer)
 {
     UpdateTimer?.Invoke(timer);
 }
 private static void OnUpdateTimer()
 {
     UpdateTimer?.Invoke();
 }