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