音效与音乐

来源:互联网 发布:微信小程序案例源码 编辑:程序博客网 时间:2024/04/29 10:45
音效:cc.SimpleAudioEngine:getInstance():playEffect(self._srcSound .. soundName)开始背景音乐:cc.SimpleAudioEngine:getInstance():playMusic(self._srcBgm ..self._soundAndBgmArray.fire_bgm, true)self._bgmHandle = ccexp.AudioEngine:play2d(BGM_DIR .. filename, true)结束背景音乐:cc.SimpleAudioEngine:getInstance():stopMusic(true)ccexp.AudioEngine:stop(self._bgmHandle)暂停:cc.SimpleAudioEngine:getInstance():pauseMusic()

0 0