public TickStateController Create(ITAlertPhotonClient photonClient) { var simulationSummary = new SimulationSummary.SimulationSummary(); // Loading var loadingState = new LoadingState(new LoadingStateInput()); loadingState.AddTransitions(new OnCompletedTransition(loadingState, LoginState.StateName)); // Login var loginState = new LoginState(); loginState.AddTransitions(new OnCompletedTransition(loginState, MenuState.StateName)); // Menu var menuState = new MenuState(photonClient); // Room var roomStateInput = new RoomStateInput(photonClient); var roomState = new RoomState(roomStateInput, photonClient, simulationSummary); // Test Simulation Summary var simulationSummaryStateInput = new SimulationSummaryStateInput(simulationSummary); var simulationSummaryState = new SimulationSummaryState(simulationSummaryStateInput, simulationSummary); // Add states to controller var stateController = new TickStateController(loadingState, loginState, menuState, roomState, simulationSummaryState); stateController.SetParent(ParentStateController); roomState.SetSubstateParentController(stateController); menuState.SetSubstateParentController(stateController); return stateController; }
public TickStateController Create() { var lobbyState = CreateLobbyState(_photonClient); var initializingState = CreateInitializingState(_photonClient); var playingState = CreatePlayingState(_photonClient); var pausedState = CreatePausedState(_photonClient); var settingsState = CreateSettingsState(_photonClient); var feedbackState = CreateFeedbackState(_photonClient); var simulationSummaryState = CreateSimulationSummaryState(_simulationSummary); var launchQuestionnaireState = CreateLaunchQuestionnaireState(); var stateController = new TickStateController( lobbyState, initializingState, playingState, pausedState, feedbackState, simulationSummaryState, settingsState, launchQuestionnaireState); stateController.SetParent(ParentStateController); return(stateController); }
public TickStateController Create() { var createGameController = new CreateGameController(_photonClient); var scenarioController = new ScenarioController(_photonClient, createGameController); var mainMenuState = CreateMainMenuState(_photonClient, scenarioController); var scenarioListState = CreateScenarioListState(_photonClient, scenarioController); var gameListState = CreateGameListState(_photonClient); var createGameState = CreateCreateGameState(_photonClient, createGameController, scenarioController); var settingsState = CreateSettingsState(); var stateController = new TickStateController( mainMenuState, scenarioListState, gameListState, createGameState, settingsState); stateController.SetParent(ParentStateController); return(stateController); }