示例#1
0
 private void MuteVolumeReset()
 {
     if (_mutedVolume)
     {
         _mutedVolume = false;
         MuteUnmuteVolumeEvent?.Invoke(_mutedVolume);
     }
 }
示例#2
0
        private void MuteVolumeRestore()
        {
            if (audioSoundSliderValue == 0.0f)
            {
                _mutedVolume = true;
            }

            MuteUnmuteVolumeEvent?.Invoke(_mutedVolume);
        }
示例#3
0
        public void MuteVolume()
        {
            if (!_mutedVolume)
            {
                if (audioSoundSliderValue > 0.0f)
                {
                    _soundVolumeSave = audioSoundSliderValue;
                }
                if (audioMusicSliderValue > 0.0f)
                {
                    _musicVolumeSave = audioMusicSliderValue;
                }

                ChangeSoundVal(0f);
                ChangeMusicVal(0f);

                _mutedVolume = true;
                MuteUnmuteVolumeEvent?.Invoke(_mutedVolume);
            }
        }
示例#4
0
        public void UnmuteVolume()
        {
            if (_mutedVolume)
            {
                if (audioSoundSliderValue == 0.0f)
                {
                    _soundVolumeSave = 0.4f;
                }
                if (audioMusicSliderValue == 0.0f)
                {
                    _musicVolumeSave = 0.2f;
                }

                ChangeSoundVal(_soundVolumeSave);
                ChangeMusicVal(_musicVolumeSave);

                _mutedVolume = false;
                MuteUnmuteVolumeEvent?.Invoke(_mutedVolume);
            }
        }