public TickStateController Create() { var loadingState = CreateLoadingState(_scenarioController); var menuState = CreateMenuState(_scenarioController); var settingsState = CreateSettingsState(_scenarioController); var levelState = CreateLevelState(_scenarioController); var callState = CreateCallState(); var gameState = CreateGameState(_scenarioController, _modulesController); var reviewState = CreateReviewState(_scenarioController); var scoreState = CreateScoreState(_scenarioController); var questionnaireState = CreateQuestionnaireState(_scenarioController); TrackerEventSender.SetScenarioController(_scenarioController); var stateController = new TickStateController( loadingState, menuState, settingsState, levelState, callState, gameState, reviewState, scoreState, questionnaireState ); stateController.Initialize(); return(stateController); }
protected override void OnEnter() { _stateController = _controllerFactory.Create(); _stateController.Initialize(); if (!GameExceptionHandler.HasException) { _stateController.EnterState(MainMenuState.StateName); } }
public void TickTransition(string fromStateName, string toStateName) { // Arrange _stateController.Initialize(); _stateController.EnterState(fromStateName); _stateTransitionBlackboard.ToStateName = toStateName; // Act _stateController.Tick(0f); // Assert Assert.AreEqual(toStateName, _stateController.ActiveStateName); }
public void TickTransition(Type fromState, Type toState) { // Arrange var fromStateName = fromState.FullName; var toStateName = toState.FullName; _stateController.Initialize(); _stateController.EnterState(fromStateName); _tickStateTransitionBlackboard.ToStateName = toStateName; // Act _stateController.Tick(0f); // Assert Assert.Equal(toStateName, _stateController.ActiveStateName); }
protected override void OnEnter() { _photonClient?.Dispose(); _photonClient = new ITAlertPhotonClient(GamePlugin, GameVersion, new ITAlertMessageSerializationHandler()); _photonClient.ExceptionEvent += OnClientException; _photonClient.ConnectedEvent += OnConnected; PlayerCommands.PhotonClient = _photonClient; DebugCommands.PhotonClient = _photonClient; _stateController = _stateControllerFactory.Create(_photonClient); _stateController.Initialize(); if (!GameExceptionHandler.HasException) { _stateController.EnterState(LoadingState.StateName); _photonClient.Connect(); } }
protected override void OnEnter() { LogProxy.Info("RoomState: OnEnter"); _photonClient.CurrentRoom.Messenger.Subscribe((int)ITAlertChannel.Error, ProcessErrorMessage); _voiceController = new VoiceController( _photonClient, _director, () => Input.GetKeyDown(KeyCode.Tab) || _talkButton.IsDownFrame, () => Input.GetKeyUp(KeyCode.Tab) || _talkButton.IsUpFrame || !Application.isFocused); _stateController = _controllerFactory.Create(); _stateController.Initialize(); if (!GameExceptionHandler.HasException) { _stateController.EnterState(LobbyState.StateName); } }
private void Start() { StartCoroutine(LoadConfigs()); _stateController.Initialize(); }
private void Start() { _stateController.Initialize(LoadingState.StateName); }