public void Update(float deltaTime) { if (State == TimerStates.Running) { Elapsed += deltaTime; if (Elapsed >= lastInterval) { OnTick.Dispatch(Count, deltaTime); Count++; lastInterval += Interval; } if (Elapsed >= Duration) { State = TimerStates.Finished; OnFinish.Dispatch(); } } }