Commit 57dd8115 authored by jeff's avatar jeff

更新

parent 082b2e0c
...@@ -68,7 +68,7 @@ cc.Class({ ...@@ -68,7 +68,7 @@ cc.Class({
this._playing = true this._playing = true
cc.assetManager.loadRemote(url, (err, audioClip) => { cc.assetManager.loadRemote(url, (err, audioClip) => {
if (err) return if (err) return
if (playingItem) playingItem.stopAudio() if (playingItem && playingItem != this) playingItem.stopAudio()
if (!this._playing) return if (!this._playing) return
this.audioId = cc.audioEngine.play(audioClip, false, 0.8); this.audioId = cc.audioEngine.play(audioClip, false, 0.8);
cc.audioEngine.setFinishCallback(this.audioId, this.stopAudio.bind(this)); cc.audioEngine.setFinishCallback(this.audioId, this.stopAudio.bind(this));
......
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