/// <summary> /// Starts loading a new game session instance. /// </summary> public void StartLoad(GameParameter parameter) { var gameScreen = ScreenNavigator.CreateHidden <GameScreen>(); var selectedMap = SelectedMap.Value; var modeServicer = ModeManager.GetService(selectedMap.PlayableMode); loadingState.BindTo(GameModel.LoadState); // Start loading the game. GameModel.LoadGame(parameter, modeServicer); // Listen to game screen init event. GameModel.LoadState.BindAndTrigger(OnLoadStateChange); }
/// <summary> /// Returns the mode service instance for the current game mode. /// </summary> public IModeService GetModeService() { return(ModeManager.GetService(GameMode.Value)); }
/// <summary> /// Returns the mode servicer for currently selected game mode. /// </summary> public IModeService GetSelectedModeService() => ModeManager.GetService(GameMode.Value);