protected override void Enter() { _nextState = null; _fixedVerticalPipesLauncherGB = GameBehavioursStorer.Instance.Get <FixedVerticalPipesLauncherGB>(); _nPipesToLauchUntilShowQuestion = Random.Range( Settings.minPipesLaunchedUntilLaunchHorizontalPipes, Settings.maxPipesLaunchedUntilLaunchHorizontalPipes); Controller.Add <FixedVerticalPipesLauncherGB>(); if (Random.Range(0, 2) == 0) { AnswersFactory.Instance.CreateUp(Data.Question.correctAnswerType, Data.Question.correctAnswerContent); AnswersFactory.Instance.CreateDown(Data.Question.incorrectAnswerType, Data.Question.incorrectAnswerContent); Data.CorrectAnswer = HorizontalPipe.UP; } else { AnswersFactory.Instance.CreateUp(Data.Question.incorrectAnswerType, Data.Question.incorrectAnswerContent); AnswersFactory.Instance.CreateDown(Data.Question.correctAnswerType, Data.Question.correctAnswerContent); Data.CorrectAnswer = HorizontalPipe.DOWN; } Controller.On(GameEvent.GO_GAME_OVER, GoGameOverState); }
protected override void Enter() { _nextState = null; _fixedVerticalPipesLauncherGB = GameBehavioursStorer.Instance.Get <FixedVerticalPipesLauncherGB>(); _nPipesToLauchUntilShowQuestion = Random.Range( Settings.minPipesLaunchedUntilShowQuestion, Settings.maxPipesLaunchedUntilShowQuestion); Controller.VelPlayerScenario = GameSettings.Instance.vel; MarkersStorer.Instance.DistanceMarkerController.SetActive(); MarkersStorer.Instance.CorrectAnswersMarkerController.SetActive(); Controller.Add <FixedVerticalPipesLauncherGB>(); Controller.On(GameEvent.GO_GAME_OVER, GoGameOverState); }
protected override void Enter() { _nextState = null; _fixedVerticalPipesLauncherGB = GameBehavioursStorer.Instance.Get <FixedVerticalPipesLauncherGB>(); _nPipesToLauchUntilShowQuestion = Random.Range( Settings.minPipesLaunchedUntilShowAnswers, Settings.maxPipesLaunchedUntilShowAnswers); Controller.Add <FixedVerticalPipesLauncherGB>(); Data.Question = QuestionGenerator.Instance.GetNew(); QuestionBoardController questionBoardController = QuestionBoardStorer.Instance.QuestionBoardController; questionBoardController.SetQuestion(Data.Question); questionBoardController.InitInAn(); Controller.On(GameEvent.GO_GAME_OVER, GoGameOverState); }
protected override void Enter() { _nextState = null; Controller.VelPlayerScenario = Settings.vel; OpenCloseCircleStorer.Instance.OpenCloseCircleController.OpenOn(Data.HorizontalPipeEntered); FixedVerticalPipesLauncherGB fixedVerticalPipesLauncherGB = Controller.Add <FixedVerticalPipesLauncherGB>(); fixedVerticalPipesLauncherGB.AdvancedLaunch(0f); fixedVerticalPipesLauncherGB.AdvancedLaunch(GameSettings.Instance.launchFixedVerticalPipePeriod); Controller.On(GameEvent.PLAYER_BACK_TO_DIVERT_OSBTACLE_STATE, GoNextState); Controller.Invoke(GameEvent.EXITING_HORIZONTAL_PIPE_START); GameEffectSoundManager.Instance.PlayHitQuestion(); }