Commit 4a581f69 authored by wanqing's avatar wanqing

失败或者胜利停止背景音乐

parent ab099649
...@@ -183,14 +183,22 @@ public class BattleUI : MonoBehaviour ...@@ -183,14 +183,22 @@ public class BattleUI : MonoBehaviour
//{ //{
// m_gameBestTime.text = string.Format("{0:d2}:{1:d2}", varCurTime / 60, varCurTime % 60); // m_gameBestTime.text = string.Format("{0:d2}:{1:d2}", varCurTime / 60, varCurTime % 60);
//} //}
GameServices.audioServices.PlayAudio(GameServices.configService.audioConfig.Success); GameServices.audioServices.RecycleBgm();
GameServices.audioServices.PlayAudio(GameServices.configService.audioConfig.Success,false, delegate ()
{
GameServices.audioServices.PlayBgm(GameServices.configService.audioConfig.GameBgm);
});
} }
//失败 //失败
public void OnBattleFail() public void OnBattleFail()
{ {
m_loseObj.SetActive(true); m_loseObj.SetActive(true);
m_selectLevelObj.SetActive(false); m_selectLevelObj.SetActive(false);
GameServices.audioServices.PlayAudio(GameServices.configService.audioConfig.GetFail()); GameServices.audioServices.RecycleBgm();
GameServices.audioServices.PlayAudio(GameServices.configService.audioConfig.GetFail(),false, delegate ()
{
GameServices.audioServices.PlayBgm(GameServices.configService.audioConfig.GameBgm);
});
} }
/// 加载关卡前调用,隐藏不需要显示的ui /// 加载关卡前调用,隐藏不需要显示的ui
public void OnBeforeLoadLevel() public void OnBeforeLoadLevel()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment