예제 #1
0
 public void Execute()
 {
     _timeService.AddTimedEvent(_typingRaceInstance.UpdateTypingSpeed);
     _timeService.AddTimedEvent(_typingRaceInstance.TrySetToGameOverState);
     _timeService.EnableEventDispatching();
     _timeService.RestartGameTimer();
 }
예제 #2
0
        public void Undo()
        {
            if (_timerWasRunning)
            {
                _timeService.StartGameTimer();
            }

            if (_eventDispatchingWasEnabled)
            {
                _timeService.EnableEventDispatching();
            }

            if (_previousState != null)
            {
                _typingRaceInstance.ChangeState(_previousState);
            }
        }