Commit 5c00efde authored by 李维's avatar 李维

修复报错卡主问题

parent 8a9586be
......@@ -788,6 +788,7 @@ export default class NewClass extends middleLayerBase {
return new Promise(resolve => {
if(type == 0) {
// 单课件完成
btn_next.scale = 0;
btn_replay.scale = 0;
......@@ -810,30 +811,28 @@ export default class NewClass extends middleLayerBase {
.to(0.35, { scale: targetScale })
.call(() => {
resolve(true);
this.showFinishLayer(-1);
})
.start();
} else if (type == 1) {
btn_ok.scale = 0;
// 一课全部完成
finishLayer.active = true;
aniOne.active = false;
aniAll.active = true;
btn_next.active = false;
btn_replay.active = false;
btn_ok.active = true;
btn_ok.active = false;
aniAll.getComponent(dragonBones.ArmatureDisplay).playAnimation('newAnimation', 1);
const targetScale = 0.65;
// const targetScale = 0.65;
cc.tween(btn_ok)
.delay(0.4)
.to(0.25, { scale: targetScale })
.delay(0.8)
.call(() => {
resolve(true);
this.showFinishLayer(-1);
this.playFinishLayerAnim(-1);
})
.start();
} else {
// 隐藏全部
finishLayer.active = false;
aniOne.active = false;
aniAll.active = false;
......@@ -847,19 +846,19 @@ export default class NewClass extends middleLayerBase {
// 点击下一页按钮
handleClickBtnFinishNext() {
this.showFinishLayer(-1);
this.playFinishLayerAnim(-1);
this.goNextPage();
}
// 点击重玩当前页按钮
handleClickBtnFinishReplay() {
this.showFinishLayer(-1);
this.playFinishLayerAnim(-1);
this.reloadBundle();
}
// 点击确定按钮
handleClickBtnFinishOk() {
this.showFinishLayer(-1);
this.playFinishLayerAnim(-1);
}
isLevelActived() {
......
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