// Called on the very first round, for now here the initial elements can be initialized public void CreateInitialRound(IExerciseRoundDataVO dataVo) { _roundData = dataVo as FlashGlanceRoundDataVO; _fieldHeight = _roundData.NumberOfRows; _fieldWidth = _roundData.NumberOfColumns; _gap = Rect.rect.width / _fieldWidth; var tempGap = Rect.rect.height / _fieldHeight; _gap = _gap > tempGap ? tempGap : _gap; _itemSize = _gap * 0.8f; System.Diagnostics.Debug.WriteLine("CreateInitialRound"); foreach (FlashGlanceRoundItemVO item in _roundData.Items) { var newItem = InitItem(item); if (newItem.IsHidden) { newItem.Appear(); } } slider.Init(_roundData); RoundCreated.Dispatch(); //TestAnswer(); }
public virtual void CreateViewRound(IExerciseRoundDataVO roundData) { if (_botActived) { UpdateBotTimeouts(roundData); } UpdateTutorialForNewRound(); if (roundData.LevelState == LevelState.NEW) { _view.CreateInitialRound(roundData); } else if (roundData.LevelState == LevelState.UP) { _view.CreateRoundLevelUp(roundData); } else if (roundData.LevelState == LevelState.DOWN) { _view.CreateRoundLevelDown(roundData); } else { _view.CreateRound(roundData); } }
public override void CreateViewRound(IExerciseRoundDataVO roundData) { base.CreateViewRound(roundData); // Manage timers here. updateEvantTimer(FlashGlanceEventType.ItemSpawning); updateEvantTimer(FlashGlanceEventType.ItemMovement); updateEvantTimer(FlashGlanceEventType.ItemSwitching); }
private void CreateInitialRound(IExerciseRoundDataVO dataVO) { var roundData = dataVO as MemoflowRoundDataVO; _numCards = roundData.NumCards; var items = roundData.Items; foreach (MemoflowStepVO item in items) { mediated.AddItem(item.SymbolId); } }
private void CreateInitialRound(IExerciseRoundDataVO dataVO) { hotKeys.KeyActions = new Dictionary <string, Action> { { "space", OnOk }, }; var advice = localization.Get(TextKeys.MF_ADVICE); var ok = localization.Get(TextKeys.OK); mediated.ShowIntro(advice, ok); }
private void CreateRound(IExerciseRoundDataVO dataVO) { var roundData = dataVO as MemoflowRoundDataVO; var countDelta = 0; if (_numCards != roundData.NumCards) { countDelta = roundData.NumCards - _numCards; _numCards = roundData.NumCards; } var items = roundData.Items; var nextItem = items[items.Count - 1] as MemoflowStepVO; mediated.AppendItem(nextItem.SymbolId, countDelta); }
// This is called every round after the initial one, update the elements here public void CreateRound(IExerciseRoundDataVO dataVo) { FlashGlanceRoundDataVO lastRoundData = _roundData; _roundData = dataVo as FlashGlanceRoundDataVO; System.Diagnostics.Debug.WriteLine("CreateRound"); foreach (FlashGlanceRoundItemVO item in _roundData.Items) { var newItem = InitItem(item); if (newItem.IsHidden) { newItem.Appear(); } } slider.Update(_roundData); RoundCreated.Dispatch(); //TestAnswer(); }
public virtual void OnStateInit() { if (!_stopped) { try { _model.CreateRound((round) => { _currentRound = round; var tutorialStateHandler = _tutorialManager.GetTutorialTypeAndUpdate(); if (tutorialStateHandler == TutorialManager.TYPE_NO_TUTORIAL) { MapStates(); } else { MapTutorialStates(tutorialStateHandler); } CurrentState = BaseStates.SHOW_ROUND; }); } catch (Exception e) { _logger.LogMessage(LogLevel.Error, "OnStateInit " + e.Message); } } }
protected virtual void UpdateBotTimeouts(IExerciseRoundDataVO roundData) { _logger.LogMessage(LogLevel.Warning, "bot active shorter timeout"); roundData.MemorizeTimeout = 1000; }
public virtual void CreateRoundLevelDown(IExerciseRoundDataVO roundDataVO) { Trace(roundDataVO); controllerProxy.OnCreateRound.Dispatch(roundDataVO); }
public virtual void CreateInitialRound(IExerciseRoundDataVO roundDataVO) { Trace(roundDataVO); controllerProxy.OnCreateInitialRound.Dispatch(roundDataVO); }
public FullRoundVO(IExerciseRoundDataVO roundDataVO) { this.RoundDataVO = roundDataVO; this.RoundResult = new List <IRoundEvaluationResultVO>(); }