refactor: 移除多余的新手引导2、3、4相关代码和资源
1. 删除Guide2、Guide3、Guide4的UIID配置和对应弹窗资源 2. 移除MissionCardComp中关闭guide3、guide4的逻辑代码 3. 移除GuideComp中对应guide2、3、4的UIID判断逻辑 4. 简化云函数代码中冗余的get请求分支 5. 调整按钮抖动动画的时长参数优化视觉效果 6. 新增微信云开发客户端API封装代码
This commit is contained in:
@@ -46,9 +46,6 @@ export class GuideComp extends Component {
|
||||
// 所以应当通过 oops.gui.remove 彻底从框架的层级管理中移除当前界面。
|
||||
let targetUIID = -1;
|
||||
if (this.guide_id === 1) targetUIID = UIID.Guide1;
|
||||
if (this.guide_id === 2) targetUIID = UIID.Guide2;
|
||||
if (this.guide_id === 3) targetUIID = UIID.Guide3;
|
||||
if (this.guide_id === 4) targetUIID = UIID.Guide4;
|
||||
|
||||
if (targetUIID !== -1) {
|
||||
oops.gui.remove(targetUIID);
|
||||
|
||||
@@ -488,11 +488,6 @@ export class MissionCardComp extends CCComp {
|
||||
private onFightStart() {
|
||||
this.enterBattlePhase();
|
||||
|
||||
// 第一次进入战斗阶段,关闭guide4
|
||||
if (!smc.finish_guides.includes(4)) {
|
||||
smc.finish_guides.push(4);
|
||||
oops.gui.remove(UIID.Guide4);
|
||||
}
|
||||
|
||||
// 首次进入战斗阶段:启动按钮逐个指引(仅提醒 1 次)
|
||||
if (!smc.finish_guides.includes(MissionCardComp.BUTTON_GUIDE_ID)) {
|
||||
@@ -749,12 +744,7 @@ export class MissionCardComp extends CCComp {
|
||||
this.updatePanelButtonsInteractable();
|
||||
}
|
||||
|
||||
// 第一次召唤英雄后,关闭guide3
|
||||
// 注:首个英雄召唤后战斗自动开始(见 MissionComp),不再需要 Guide4 引导点击开始按钮
|
||||
if (!smc.finish_guides.includes(3)) {
|
||||
smc.finish_guides.push(3);
|
||||
oops.gui.remove(UIID.Guide3);
|
||||
}
|
||||
|
||||
|
||||
// 英雄登场后同步英雄信息盒
|
||||
this.refreshHeroBoxSlots();
|
||||
@@ -1019,11 +1009,12 @@ export class MissionCardComp extends CCComp {
|
||||
if (!child || !child.isValid) continue;
|
||||
Tween.stopAllByTarget(child);
|
||||
child.angle = 0;
|
||||
// 单轮抖动约 0.94s(含间歇),节奏放慢避免高频晃动过刺眼
|
||||
let t = tween(child)
|
||||
.to(0.07, { angle: angle })
|
||||
.to(0.14, { angle: -angle })
|
||||
.to(0.07, { angle: 0 })
|
||||
.delay(0.12);
|
||||
.to(0.15, { angle: angle })
|
||||
.to(0.3, { angle: -angle })
|
||||
.to(0.15, { angle: 0 })
|
||||
.delay(0.34);
|
||||
if (repeat) {
|
||||
t = t.repeatForever();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user