Commit 6ca998b9 authored by limingzhe's avatar limingzhe

fix: debug

parent 4826d297
...@@ -497,8 +497,8 @@ cc.Class({ ...@@ -497,8 +497,8 @@ cc.Class({
} }
canvas.on(cc.Node.EventType.TOUCH_START, touchStart) // canvas.on(cc.Node.EventType.TOUCH_START, touchStart)
canvas.on(cc.Node.EventType.MOUSE_DOWN, mouseDown) // canvas.on(cc.Node.EventType.MOUSE_DOWN, mouseDown)
canvas.on(cc.Node.EventType.TOUCH_MOVE, touchMove) canvas.on(cc.Node.EventType.TOUCH_MOVE, touchMove)
canvas.on(cc.Node.EventType.MOUSE_MOVE, mouseMove) canvas.on(cc.Node.EventType.MOUSE_MOVE, mouseMove)
...@@ -658,17 +658,17 @@ cc.Class({ ...@@ -658,17 +658,17 @@ cc.Class({
if (!this.totalTime) { if (!this.totalTime) {
totalTimeAudioId = cc.audioEngine.play(audioClip, false, 0); totalTimeAudioId = cc.audioEngine.play(audioClip, false, 0);
this.audioId = totalTimeAudioId; // this.audioId = totalTimeAudioId;
checkHasDuration(); checkHasDuration();
} else { } else {
this.audioId = cc.audioEngine.play(audioClip, false, 0.8); // this.audioId = cc.audioEngine.play(audioClip, false, 0.8);
setTimeout(() => { // setTimeout(() => {
if (this.isDestroy) { // if (this.isDestroy) {
return; // return;
} // }
cc.audioEngine.pause(this.audioId); // cc.audioEngine.pause(this.audioId);
}, 10); // }, 10);
} }
...@@ -739,18 +739,19 @@ cc.Class({ ...@@ -739,18 +739,19 @@ cc.Class({
return; return;
} }
this.audioId = cc.audioEngine.play(audioClip, false, 0.8); // this.audioId = cc.audioEngine.play(audioClip, false, 0.8);
setTimeout(() => { // setTimeout(() => {
if (this.isDestroy) { // if (this.isDestroy) {
return; // return;
} // }
cc.audioEngine.pause(this.audioId); // cc.audioEngine.pause(this.audioId);
}, 10); // }, 10);
playBtn.active = true; playBtn.active = true;
pauseBtn.active = false; pauseBtn.active = false;
this.isAudioPlaying = false; this.isAudioPlaying = false;
this.audioId = null;
// this.audioId = audioId = null; // this.audioId = audioId = null;
}); });
}) })
......
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