Beispiel #1
0
        }                                                                        // default to not paused

        public void Update()
        {
            if (Input.GetKeyDown(KeyCode.Escape) || Input.GetKeyDown(KeyCode.JoystickButton7))             // start button
            {
                switch (_pauseState)
                {
                case PauseState.NOT_PAUSED:
                {
                    ChangePauseState(PauseState.MAIN_PAUSE);
                    break;
                }

                case PauseState.MAIN_PAUSE:
                {
                    ChangePauseState(PauseState.NOT_PAUSED);
                    break;
                }

                case PauseState.SETTINGS:
                {
                    ChangePauseState(PauseState.NOT_PAUSED);
                    UISettingsScript.ApplySettings();
                    break;
                }
                }
            }
        }