声音的播放
--filename声音文件路径 loop是否循环 self.musicVolume声音大小
self.bgMusicAudioID = ccexp.AudioEngine:play2d(filename, loop, self.musicVolume)  --播放
ccexp.AudioEngine:pause(self.bgMusicAudioID) --暂停
ccexp.AudioEngine:resume(self.bgMusicAudioID) --继续
ccexp.AudioEngine:stop(audioID) --停止
ccexp.AudioEngine:pauseAll()
ccexp.AudioEngine:resumeAll()
ccexp.AudioEngine:stopAll()

首页 我的博客
粤ICP备17103704号