diff --git a/assets/resources/gui/element/guide1.prefab b/assets/resources/gui/element/guide1.prefab index 6a89846d..ae7fd716 100644 --- a/assets/resources/gui/element/guide1.prefab +++ b/assets/resources/gui/element/guide1.prefab @@ -32,13 +32,10 @@ }, { "__id__": 53 - }, - { - "__id__": 55 } ], "_prefab": { - "__id__": 57 + "__id__": 55 }, "_lpos": { "__type__": "cc.Vec3", @@ -1279,32 +1276,6 @@ "__type__": "cc.CompPrefabInfo", "fileId": "10DsksGxZDUbKjtrjCTMxF" }, - { - "__type__": "25122z/cnRPhp90+CJYs5+r", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 1 - }, - "_enabled": true, - "__prefab": { - "__id__": 56 - }, - "hand": { - "__id__": 2 - }, - "clickNode": { - "__id__": 31 - }, - "guide_id": 0, - "animation_name": "dianji", - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "1fYnYBrbBNgoLyArRX18hs" - }, { "__type__": "cc.PrefabInfo", "root": { diff --git a/assets/resources/gui/element/guide2.prefab b/assets/resources/gui/element/guide2.prefab index 69455f8f..6b3dd5f5 100644 --- a/assets/resources/gui/element/guide2.prefab +++ b/assets/resources/gui/element/guide2.prefab @@ -32,13 +32,10 @@ }, { "__id__": 53 - }, - { - "__id__": 55 } ], "_prefab": { - "__id__": 57 + "__id__": 55 }, "_lpos": { "__type__": "cc.Vec3", @@ -1279,32 +1276,6 @@ "__type__": "cc.CompPrefabInfo", "fileId": "10DsksGxZDUbKjtrjCTMxF" }, - { - "__type__": "25122z/cnRPhp90+CJYs5+r", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 1 - }, - "_enabled": true, - "__prefab": { - "__id__": 56 - }, - "hand": { - "__id__": 2 - }, - "clickNode": { - "__id__": 31 - }, - "guide_id": 0, - "animation_name": "dianji", - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "1fYnYBrbBNgoLyArRX18hs" - }, { "__type__": "cc.PrefabInfo", "root": { diff --git a/assets/resources/gui/element/guide3.prefab b/assets/resources/gui/element/guide3.prefab index c2dfb61d..131715cd 100644 --- a/assets/resources/gui/element/guide3.prefab +++ b/assets/resources/gui/element/guide3.prefab @@ -32,13 +32,10 @@ }, { "__id__": 53 - }, - { - "__id__": 55 } ], "_prefab": { - "__id__": 57 + "__id__": 55 }, "_lpos": { "__type__": "cc.Vec3", @@ -1279,32 +1276,6 @@ "__type__": "cc.CompPrefabInfo", "fileId": "10DsksGxZDUbKjtrjCTMxF" }, - { - "__type__": "25122z/cnRPhp90+CJYs5+r", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 1 - }, - "_enabled": true, - "__prefab": { - "__id__": 56 - }, - "hand": { - "__id__": 2 - }, - "clickNode": { - "__id__": 31 - }, - "guide_id": 0, - "animation_name": "dianji", - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "1fYnYBrbBNgoLyArRX18hs" - }, { "__type__": "cc.PrefabInfo", "root": { diff --git a/assets/resources/gui/element/guide4.prefab b/assets/resources/gui/element/guide4.prefab index 9ceb000f..038e41cf 100644 --- a/assets/resources/gui/element/guide4.prefab +++ b/assets/resources/gui/element/guide4.prefab @@ -32,13 +32,10 @@ }, { "__id__": 53 - }, - { - "__id__": 55 } ], "_prefab": { - "__id__": 57 + "__id__": 55 }, "_lpos": { "__type__": "cc.Vec3", @@ -1279,32 +1276,6 @@ "__type__": "cc.CompPrefabInfo", "fileId": "10DsksGxZDUbKjtrjCTMxF" }, - { - "__type__": "25122z/cnRPhp90+CJYs5+r", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 1 - }, - "_enabled": true, - "__prefab": { - "__id__": 56 - }, - "hand": { - "__id__": 2 - }, - "clickNode": { - "__id__": 31 - }, - "guide_id": 0, - "animation_name": "dianji", - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "1fYnYBrbBNgoLyArRX18hs" - }, { "__type__": "cc.PrefabInfo", "root": { diff --git a/assets/script/game/common/config/GameUIConfig.ts b/assets/script/game/common/config/GameUIConfig.ts index 8037b5c2..1c17a95d 100644 --- a/assets/script/game/common/config/GameUIConfig.ts +++ b/assets/script/game/common/config/GameUIConfig.ts @@ -24,6 +24,10 @@ export enum UIID { HInfo, /** 技能卡牌系统核心控制器 */ SkillBox, + Guide1, + Guide2, + Guide3, + Guide4, } /** 打开界面方式的配置数据 */ @@ -40,4 +44,8 @@ export var UIConfigData: { [key: number]: UIConfig } = { [UIID.Mission]: { layer: LayerType.UI, prefab: "gui/element/mission" }, [UIID.HInfo]: { layer: LayerType.UI, prefab: "gui/element/hnode" }, [UIID.SkillBox]: { layer: LayerType.UI, prefab: "gui/element/skillbox" }, + [UIID.Guide1]: { layer: LayerType.PopUp, prefab: "gui/element/guide1" }, + [UIID.Guide2]: { layer: LayerType.PopUp, prefab: "gui/element/guide2" }, + [UIID.Guide3]: { layer: LayerType.PopUp, prefab: "gui/element/guide3" }, + [UIID.Guide4]: { layer: LayerType.PopUp, prefab: "gui/element/guide4" }, } \ No newline at end of file diff --git a/assets/script/game/map/MissionCardComp.ts b/assets/script/game/map/MissionCardComp.ts index 19c4fed0..c2073014 100644 --- a/assets/script/game/map/MissionCardComp.ts +++ b/assets/script/game/map/MissionCardComp.ts @@ -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 */ diff --git a/assets/script/game/map/MissionHomeComp.ts b/assets/script/game/map/MissionHomeComp.ts index 36511625..c98b5b90 100644 --- a/assets/script/game/map/MissionHomeComp.ts +++ b/assets/script/game/map/MissionHomeComp.ts @@ -70,6 +70,11 @@ export class MissionHomeComp extends CCComp { /** 启动时显示主页 */ start() { this.home_active() + + // 首次打开游戏打开guide1 + if (!smc.finish_guides.includes(1)) { + oops.gui.open(UIID.Guide1); + } } onEnable(){ @@ -88,6 +93,13 @@ export class MissionHomeComp extends CCComp { */ start_mission() { mLogger.log(this.debugMode, 'MissionHomeComp', "start_mission") + + // 进入战斗后,关闭guide1 + if (!smc.finish_guides.includes(1)) { + smc.finish_guides.push(1); + oops.gui.remove(UIID.Guide1); + } + oops.gui.open(UIID.Mission) this.node.active=false;