Commit 7c190ce0 authored by 李维's avatar 李维

把异步操作加到数组中

parent 0496df09
......@@ -258,10 +258,12 @@ cc.Class({
nextBtn.on(cc.Node.EventType.TOUCH_END, this.onTouchPanelRight, this)
},
checkShowArrowBtn() {
setTimeout(() => {
this.lastBtn.active = !this.nodeDict.btnLast.children[1].active;
this.nextBtn.active = !this.nodeDict.btnNext.children[1].active;
}, 220);
this._timeoutIds.push(setTimeout(() => {
if(this.nodeDict) {
this.lastBtn.active = !this.nodeDict.btnLast.children[1].active;
this.nextBtn.active = !this.nodeDict.btnNext.children[1].active;
}
}, 220))
},
autoPlay() {
this.inited = true;
......@@ -437,10 +439,10 @@ cc.Class({
const cat = cc.find('Canvas/mao');
playDragonBoneAnimation(cat, 'finish', 0);
this.playAudioByUrl(this.data.endAudio, () => {
setTimeout(() => {
this._timeoutIds.push(setTimeout(() => {
playDragonBoneAnimation(cat, 'normal', -1);
cb();
}, 500);
}, 500))
});
},
......
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