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

修复报错卡主问题

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