Пример #1
0
        private void OnEnable()
        {
            if (!_silentPopup)
            {
                GetComponent <SoundHandler>().PlayOneShot();
            }
            else
            {
                _silentPopup = false;
            }

            if (Opened != null)
            {
                _previousPopup = Opened;
                Opened         = this;
                _previousPopup.Close();
            }
            else
            {
                Opened = this;
            }


            if (lowpassMusic)
            {
                MusicMaster.Lowpass(true);
            }

            DimmerHandler.Switch(true);
        }
Пример #2
0
        private void Start()
        {
            _contentPosition = new StoredInt(PrefContentPosition, 0);
            var position = content.position;

            position.y       = _contentPosition.Value;
            content.position = position;
            MusicMaster.Play(Music.MainMenu);
        }
Пример #3
0
        private void OnDisable()
        {
            MusicMaster.Lowpass(false);
            DimmerHandler.Switch(false);

            if (Opened == this)
            {
                Opened = null;
            }
            if (_previousPopup is null)
            {
                return;
            }
            _previousPopup.Open(true);
            _previousPopup = null;
        }
Пример #4
0
#pragma warning restore CS0649

        private void Start()
        {
            playButton.onClick.AddListener(ClickPlay);
            MusicMaster.Play(Music.MainMenu);
        }