Exemplo n.º 1
0
 /// <summary>
 /// function to pause the scene and all the live scripts in the scene
 /// </summary>
 public void PauseGame()
 {
     gameplayFSMManager.pauseGame();
     #region --deperacted Code
     ///
     /// this code make all scene the scene stop and also the controller functionality
     /// Time.timeScale = 0;
     ///
     #endregion
 }
Exemplo n.º 2
0
    public void ExitToTheSameState()
    {
        ////Map to according to the transitionDirection
        switch (gameplayFSMManager.tempTransitionFrom.GetState())
        {
        case GameplayState.Tutorial:
            switch (gameplayFSMManager.tempTransitionTo.GetState())
            {
            case GameplayState.Tutorial:
                printSelfMappingError(GameplayState.Tutorial);
                break;

            case GameplayState.AssemblyDisassembly:
                gameplayFSMManager.toAssemblyDisassembly();
                break;

            case GameplayState.AssemblyDisassemblyTutorial:
                gameplayFSMManager.toAssemblyDisassemblyTutorial();
                break;

            case GameplayState.Shooting:
                gameplayFSMManager.toSooting();
                break;

            case GameplayState.Testing:
                gameplayFSMManager.toTesting();
                break;

            case GameplayState.Pause:
                gameplayFSMManager.pauseGame();
                break;
            }
            break;

        case GameplayState.AssemblyDisassembly:
            switch (gameplayFSMManager.tempTransitionTo.GetState())
            {
            case GameplayState.Tutorial:
                gameplayFSMManager.toTutorial();
                break;

            case GameplayState.AssemblyDisassembly:
                printSelfMappingError(GameplayState.AssemblyDisassembly);
                break;

            case GameplayState.AssemblyDisassemblyTutorial:
                gameplayFSMManager.toAssemblyDisassemblyTutorial();
                break;

            case GameplayState.Shooting:
                gameplayFSMManager.toSooting();
                break;

            case GameplayState.Testing:
                gameplayFSMManager.toTesting();
                break;

            case GameplayState.Pause:
                gameplayFSMManager.pauseGame();
                break;
            }
            break;

        case GameplayState.AssemblyDisassemblyTutorial:
            switch (gameplayFSMManager.tempTransitionTo.GetState())
            {
            case GameplayState.Tutorial:
                gameplayFSMManager.toTutorial();
                break;

            case GameplayState.AssemblyDisassembly:
                gameplayFSMManager.toAssemblyDisassembly();
                break;

            case GameplayState.AssemblyDisassemblyTutorial:
                printSelfMappingError(GameplayState.AssemblyDisassemblyTutorial);
                break;

            case GameplayState.Shooting:
                gameplayFSMManager.toSooting();
                break;

            case GameplayState.Testing:
                gameplayFSMManager.toTesting();
                break;

            case GameplayState.Pause:
                gameplayFSMManager.pauseGame();
                break;
            }
            break;

        case GameplayState.Shooting:
            switch (gameplayFSMManager.tempTransitionTo.GetState())
            {
            case GameplayState.Tutorial:
                gameplayFSMManager.toTutorial();
                break;

            case GameplayState.AssemblyDisassembly:
                gameplayFSMManager.toAssemblyDisassembly();
                break;

            case GameplayState.AssemblyDisassemblyTutorial:
                gameplayFSMManager.toAssemblyDisassemblyTutorial();
                break;

            case GameplayState.Shooting:
                printSelfMappingError(GameplayState.Shooting);
                break;

            case GameplayState.Testing:
                gameplayFSMManager.toTesting();
                break;

            case GameplayState.Pause:
                gameplayFSMManager.pauseGame();
                break;
            }
            break;

        case GameplayState.Testing:
            switch (gameplayFSMManager.tempTransitionTo.GetState())
            {
            case GameplayState.Tutorial:
                gameplayFSMManager.toTutorial();
                break;

            case GameplayState.AssemblyDisassembly:
                gameplayFSMManager.toAssemblyDisassembly();
                break;

            case GameplayState.AssemblyDisassemblyTutorial:
                gameplayFSMManager.toAssemblyDisassemblyTutorial();
                break;

            case GameplayState.Shooting:
                gameplayFSMManager.toSooting();
                break;

            case GameplayState.Testing:
                printSelfMappingError(GameplayState.Testing);
                break;

            case GameplayState.Pause:
                gameplayFSMManager.pauseGame();
                break;
            }
            break;

        case GameplayState.Pause:
            switch (gameplayFSMManager.tempTransitionTo.GetState())
            {
            case GameplayState.Tutorial:
                gameplayFSMManager.toTutorial();
                break;

            case GameplayState.AssemblyDisassembly:
                gameplayFSMManager.toAssemblyDisassembly();
                break;

            case GameplayState.AssemblyDisassemblyTutorial:
                gameplayFSMManager.toAssemblyDisassemblyTutorial();
                break;

            case GameplayState.Shooting:
                gameplayFSMManager.toSooting();
                break;

            case GameplayState.Testing:
                gameplayFSMManager.toTesting();
                break;

            case GameplayState.Pause:
                printSelfMappingError(GameplayState.Pause);
                break;
            }
            break;

        default:
            break;
        }
    }