//说话的时候暂时把背景音乐关掉 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); } }
//------------------------------------------------------------------------------------------------------- // 关掉游戏中声音 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); } } }