Example #1
0
 // Token: 0x06006BB1 RID: 27569 RVA: 0x001E3094 File Offset: 0x001E1294
 public void ApplyVolume(string category, bool isInitialize = false)
 {
     if (category != null)
     {
         if (!(category == "Music_VolumeControl"))
         {
             if (!(category == "SFX_VolumeControl"))
             {
                 if (category == "Voice_VolumeControl")
                 {
                     if (this.m_data.VoiceVolume < 0f)
                     {
                         this.m_data.VoiceVolume = ((!this.m_data.VoiceOn) ? 0f : 1f);
                     }
                     AudioUtility.SetVolume("Voice_VolumeControl", this.m_data.VoiceVolume, !isInitialize);
                 }
             }
             else
             {
                 if (this.m_data.SoundVolumn < 0f)
                 {
                     this.m_data.SoundVolumn = ((!this.m_data.SoundOn) ? 0f : 1f);
                 }
                 AudioUtility.SetVolume("SFX_VolumeControl", this.m_data.SoundVolumn, !isInitialize);
             }
         }
         else
         {
             if (this.m_data.MusicVolume < 0f)
             {
                 this.m_data.MusicVolume = ((!this.m_data.MusicOn) ? 0f : 1f);
             }
             AudioUtility.SetVolume("Music_VolumeControl", this.m_data.MusicVolume, !isInitialize);
         }
     }
 }
Example #2
0
 // Token: 0x06006B34 RID: 27444 RVA: 0x001E13E0 File Offset: 0x001DF5E0
 public void OnPlaySound(OnClickSound e, string name)
 {
     AudioUtility.PlaySound(name);
 }