feat(新手引导): 实现1-4号新手引导的完整流程
新增UIID.Guide1~Guide4枚举及弹窗UI配置 在任务主页组件中添加引导1的触发与完成逻辑 在任务卡牌组件中按流程触发引导2、3、4,完成步骤后自动切换并标记完成
This commit is contained in:
@@ -49,6 +49,7 @@ import { FacSet, FightSet } from "../common/config/GameSet";
|
||||
import { MoveComp } from "../hero/MoveComp";
|
||||
import { MissionHeroComp } from "./MissionHeroComp";
|
||||
import { MissionEconomy } from "./MissionEconomy";
|
||||
import { UIID } from "../common/config/GameUIConfig";
|
||||
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@@ -328,6 +329,12 @@ export class MissionCardComp extends CCComp {
|
||||
this.isBattlePhase = true;
|
||||
this.enterBattlePhase();
|
||||
this.clearAllCards();
|
||||
|
||||
// 第一次进入战斗阶段,关闭guide4
|
||||
if (!smc.finish_guides.includes(4)) {
|
||||
smc.finish_guides.push(4);
|
||||
oops.gui.remove(UIID.Guide4);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -411,6 +418,11 @@ export class MissionCardComp extends CCComp {
|
||||
const cards = this.buildSkillDrawCards();
|
||||
this.dispatchCardsToSkillSlots(cards);
|
||||
this.playSkillCardEnterAnim();
|
||||
|
||||
// 首次弹出技能三选一的时候弹出guide2
|
||||
if (!smc.finish_guides.includes(2)) {
|
||||
oops.gui.open(UIID.Guide2);
|
||||
}
|
||||
}
|
||||
|
||||
private dispatchCardsToSkillSlots(cards: CardConfig[]) {
|
||||
@@ -427,6 +439,15 @@ export class MissionCardComp extends CCComp {
|
||||
if (this.skill_card_node && this.skill_card_node.isValid) {
|
||||
this.skill_card_node.active = false;
|
||||
}
|
||||
|
||||
// 首次完成技能选取后 关闭guide2,打开guide3
|
||||
if (!smc.finish_guides.includes(2)) {
|
||||
smc.finish_guides.push(2);
|
||||
oops.gui.remove(UIID.Guide2);
|
||||
if (!smc.finish_guides.includes(3)) {
|
||||
oops.gui.open(UIID.Guide3);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** 解除按钮监听,避免节点销毁后回调泄漏 */
|
||||
@@ -474,6 +495,15 @@ export class MissionCardComp extends CCComp {
|
||||
const before = this.getAliveHeroCount();
|
||||
const after = this.getAliveHeroCount();
|
||||
this.updateHeroNumUI(true, after > before);
|
||||
|
||||
// 第一次召唤英雄后,关闭guide3,打开guide4
|
||||
if (!smc.finish_guides.includes(3)) {
|
||||
smc.finish_guides.push(3);
|
||||
oops.gui.remove(UIID.Guide3);
|
||||
if (!smc.finish_guides.includes(4)) {
|
||||
oops.gui.open(UIID.Guide4);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** 英雄死亡事件回调:刷新面板列表并更新英雄数量 UI */
|
||||
|
||||
Reference in New Issue
Block a user