Commit 97bae662 authored by 李维's avatar 李维

修复真机上按钮弹出时机不一致的问题

parent e486f2ec
...@@ -792,26 +792,24 @@ export default class NewClass extends middleLayerBase { ...@@ -792,26 +792,24 @@ export default class NewClass extends middleLayerBase {
finishLayer.active = true; finishLayer.active = true;
aniOne.active = true; aniOne.active = true;
aniAll.active = false; aniAll.active = false;
btn_next.active = true;
btn_replay.active = true;
btn_ok.active = false; btn_ok.active = false;
btn_next.scale = 0;
btn_replay.scale = 0;
aniOne.getComponent(dragonBones.ArmatureDisplay).playAnimation('newAnimation', 1); aniOne.getComponent(dragonBones.ArmatureDisplay).playAnimation('newAnimation', 1);
const targetScale = 0.65; const targetScale = 0.65;
await asyncDelay(0.6); await asyncDelay(0.7);
cc.tween(btn_next) cc.tween(btn_next)
.set({ scale: 0 }) .set({ scale: 0.2, active: true })
.to(0.35, { scale: targetScale }) .to(0.25, { scale: targetScale })
.call(()=>{
})
.start(); .start();
cc.tween(btn_replay) cc.tween(btn_replay)
.set({ scale: 0 }) .set({ scale: 0.2, active: true })
.to(0.35, { scale: targetScale }) .to(0.25, { scale: targetScale })
.call(() => { .call(() => {
resolve(true); resolve(true);
}) })
...@@ -830,7 +828,7 @@ export default class NewClass extends middleLayerBase { ...@@ -830,7 +828,7 @@ export default class NewClass extends middleLayerBase {
aniAll.getComponent(dragonBones.ArmatureDisplay).playAnimation('newAnimation', 1); aniAll.getComponent(dragonBones.ArmatureDisplay).playAnimation('newAnimation', 1);
// const targetScale = 0.5; // const targetScale = 0.5;
cc.tween(btn_ok) cc.tween(btn_ok)
.delay(2.5) .delay(2.5)
.call(() => { .call(() => {
...@@ -840,15 +838,15 @@ export default class NewClass extends middleLayerBase { ...@@ -840,15 +838,15 @@ export default class NewClass extends middleLayerBase {
.start(); .start();
} else { } else {
// 隐藏全部 // 隐藏全部
btn_next.scale = 0; btn_next.setScale(0.2);
btn_replay.scale = 0; btn_replay.setScale(0.2);
btn_ok.scale = 0;
finishLayer.active = false;
aniOne.active = false; aniOne.active = false;
aniAll.active = false; aniAll.active = false;
btn_next.active = false; btn_next.active = false;
btn_replay.active = false; btn_replay.active = false;
btn_ok.active = false; btn_ok.active = false;
finishLayer.active = false;
resolve(true); resolve(true);
} }
}) })
......
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