private void InvokeEvent() { if (OnTickTimer != null) { OnTickTimer.Invoke(); } }
private IEnumerator TickTimer(DateTime dateEnd) { while (true) { TimeSpan timeSpan = dateEnd - DateTime.Now; int totalSeconds = (int)timeSpan.TotalSeconds; if (totalSeconds <= 0) { OnEndTime?.Invoke(); coroutineTimer = null; yield break; } else { OnTickTimer?.Invoke(ToString(totalSeconds)); } yield return(null); } }