Пример #1
0
 internal void RegisterGameState(GameState gameState, GameObject container)
 {
     this.currentGameState           = new GameStateContainer();
     this.currentGameState.State     = gameState;
     this.currentGameState.Container = container;
     Debug.Log(string.Format("Registered new game state: {0}", gameState.ToString()));
 }
Пример #2
0
        /// <summary>
        /// Exit the current game state, and continue replaying the next state that is hibernating.
        /// </summary>
        internal void ExitGameState()
        {
            // Unload the current scene
            StartCoroutine(UnloadAsyncScene(this.currentGameState.State.ToString()));

            this.currentGameState = this.hibernatingGameStates.Pop();

            this.currentGameState.Container.SetActive(true);
        }