Esempio n. 1
0
        public void OnPauseButton()
        {
            if (FPSControl.IsOn())
            {
                return;
            }

            _GameState gameState = GameControl.GetGameState();

            if (gameState == _GameState.Over)
            {
                return;
            }

            if (toggleFastForward.isOn)
            {
                toggleFastForward.isOn = false;
            }

            if (gameState == _GameState.Pause)
            {
                GameControl.ResumeGame();
                UIPauseMenu.Hide();
            }
            else
            {
                GameControl.PauseGame();
                UIPauseMenu.Show();
            }
        }
Esempio n. 2
0
        void Awake()
        {
            instance = this;
            thisObj  = gameObject;

            transform.localPosition = Vector3.zero;

            sliderMusicVolume.value = AudioManager.GetMusicVolume() * 100;
            sliderSFXVolume.value   = AudioManager.GetSFXVolume() * 100;
        }