Exemplo n.º 1
0
        /// <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);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Returns the mode service instance for the current game mode.
 /// </summary>
 public IModeService GetModeService()
 {
     return(ModeManager.GetService(GameMode.Value));
 }
Exemplo n.º 3
0
 /// <summary>
 /// Returns the mode servicer for currently selected game mode.
 /// </summary>
 public IModeService GetSelectedModeService() => ModeManager.GetService(GameMode.Value);