private void RequestSwap(ITimerUpdateVO vo)
        {
            _view.Update(_model.RoundIndependentUpdate(new FlashGlanceEventRequestVO(FlashGlanceEventType.ItemSwitching)));
            FlashGlanceEventVo swichConfig = GetEventConfig(FlashGlanceEventType.ItemSwitching);

            _switchTimer.Start(GetRandomDelay(swichConfig));
        }
        private void RequestMovement(ITimerUpdateVO vo)
        {
            _view.Update(_model.RoundIndependentUpdate(new FlashGlanceEventRequestVO(FlashGlanceEventType.ItemMovement)));
            FlashGlanceEventVo moveConfig = GetEventConfig(FlashGlanceEventType.ItemMovement);

            _moveTimer.Start(GetRandomDelay(moveConfig));
        }
        private void RequestNewItem(ITimerUpdateVO vo)
        {
            _view.Update(_model.RoundIndependentUpdate(new FlashGlanceEventRequestVO(FlashGlanceEventType.ItemSpawning)));
            FlashGlanceEventVo spawnConfig = GetEventConfig(FlashGlanceEventType.ItemSpawning);

            _spawnTimer.Start(GetRandomDelay(spawnConfig));
        }
 protected virtual void OnMemorizeTimeoutComplete(ITimerUpdateVO timerUpdateVO = null)
 {
     ResetTimeoutTimer();
     _hud.Update(new List <IExerciseHudVO>()
     {
         new ShowTimeoutVO(TimeoutType.Memorized)
     });
     _view.Update(new MemorizeTimeOverVO());
 }
 private void OnTimerUpdate(ITimerUpdateVO updateVO)
 {
     if (_model.CurrentRound?.WarmUpState != WarmUpState.Enabled)
     {
         _terminator.HandelTermiantionTrigger(new TimeTerminationTrigger(updateVO));
         _hud.Update(new List <IExerciseHudVO>()
         {
             new UpdateExerciseTimeVO(updateVO)
         });
     }
 }
 protected virtual void OnTimeOutComplete(ITimerUpdateVO timerUpdateVO)
 {
     _logger.LogMessage(LogLevel.Informational, "OnTimeOutComplete");
     InputEnabled = false;
     ResetTimeoutTimer();
     _hud.Update(new List <IExerciseHudVO>()
     {
         new ShowTimeoutVO(TimeoutType.Input)
     });
     _soundManager.PlaySound(AudioEffect.Timeout);
     _model.EvaluateAnswer(HandleAnswerResult, null);
 }
Beispiel #7
0
 public TimeTerminationTrigger(ITimerUpdateVO timerUpdateVO)
 {
     TimerUpdateVO = timerUpdateVO;
 }
 private void ProcessBotAnswer(ITimerUpdateVO vo)
 {
     OnViewUpdate(_model.BotAnswer);
 }
        private void OnUpdateTime(ITimerUpdateVO vo)
        {
            var timeLeft = exerciseState.Timeout - (float)vo.TimePassed;

            UpdateTime(timeLeft);
        }
 public TimerBasedTerminationVO(ITimerUpdateVO timerUpdateVO)
 {
     TimerUpdateVO = timerUpdateVO;
 }
Beispiel #11
0
 /// <summary>
 /// Initializes a new instance of the <see cref="T:ExerciseEngine.HUD.ValueObjects.UpdateExerciseTimeVO"/> class.
 /// </summary>
 /// <param name="update">Update.</param>
 public UpdateExerciseTimeVO(ITimerUpdateVO update)
 {
     Update = update;
 }