Пример #1
0
 //说话的时候暂时把背景音乐关掉
 public void SoundMute(bool flag)
 {
     Engine.IAudio au = Engine.RareEngine.Instance().GetAudio();
     if (flag == true)
     {
         Client.IGameOption option = Client.ClientGlobal.Instance().gameOption;
         bool value = option.GetInt("Sound", "CheckSound", 1) == 1;
         au.Mute(value);
     }
     else
     {
         au.Mute(!flag);
     }
 }
Пример #2
0
        //-------------------------------------------------------------------------------------------------------
        // 关掉游戏中声音
        public void MuteGameSound(bool bMute)
        {
            bool bMuteSound = (gameOption.GetInt("Sound", "CheckSound", 1) == 1);

            if (!bMuteSound)
            {
                Engine.IAudio audio = Engine.RareEngine.Instance().GetAudio();
                if (audio != null)
                {
                    audio.Mute(bMute);
                }
            }
        }