diff --git a/assets/resources/gui/element/hnode.prefab b/assets/resources/gui/element/hnode.prefab index 7f40a0a1..26ea5d43 100644 --- a/assets/resources/gui/element/hnode.prefab +++ b/assets/resources/gui/element/hnode.prefab @@ -4834,7 +4834,7 @@ "_lpos": { "__type__": "cc.Vec3", "x": 67.5, - "y": -90, + "y": -96.599, "z": 0 }, "_lrot": { @@ -5033,7 +5033,7 @@ }, "_contentSize": { "__type__": "cc.Size", - "width": 129, + "width": 135, "height": 40 }, "_anchorPoint": { @@ -5181,10 +5181,10 @@ }, "_alignFlags": 44, "_target": null, - "_left": 3, - "_right": 3, + "_left": 0, + "_right": 0, "_top": 0, - "_bottom": -35, + "_bottom": -41.599000000000004, "_horizontalCenter": 0, "_verticalCenter": 0, "_isAbsLeft": true, @@ -5259,7 +5259,9 @@ "icon_node": { "__id__": 10 }, - "sell_node": null, + "sell_node": { + "__id__": 209 + }, "NF_node": { "__id__": 117 }, diff --git a/assets/script/game/map/HInfoComp.ts b/assets/script/game/map/HInfoComp.ts index 095885af..aa8feb43 100644 --- a/assets/script/game/map/HInfoComp.ts +++ b/assets/script/game/map/HInfoComp.ts @@ -92,6 +92,16 @@ export class HInfoComp extends CCComp { this.refresh(); } + /** + * 设置当前是否处于战斗阶段,控制出售按钮显示/隐藏 + * @param isBattlePhase 是否处于战斗阶段 + */ + setBattlePhase(isBattlePhase: boolean) { + if (this.sell_node && this.sell_node.isValid) { + this.sell_node.active = !isBattlePhase; + } + } + /** * 刷新显示: * 1. 根据英雄等级切换高级 / 普通边框。 diff --git a/assets/script/game/map/MissionCardComp.ts b/assets/script/game/map/MissionCardComp.ts index c1bde972..4f22fdb3 100644 --- a/assets/script/game/map/MissionCardComp.ts +++ b/assets/script/game/map/MissionCardComp.ts @@ -613,6 +613,12 @@ export class MissionCardComp extends CCComp { this.cards_node.active = true; Tween.stopAllByTarget(this.cards_node); this.cards_node.setScale(this.cardsShowScale); + + this.heroInfoItems.forEach(item => { + if (item.comp && item.comp.isValid) { + item.comp.setBattlePhase(false); + } + }); } private enterBattlePhase() { @@ -627,6 +633,12 @@ export class MissionCardComp extends CCComp { } }) .start(); + + this.heroInfoItems.forEach(item => { + if (item.comp && item.comp.isValid) { + item.comp.setBattlePhase(true); + } + }); } /** 构建本次抽卡结果,保证最终可分发4条数据 */ @@ -847,6 +859,7 @@ export class MissionCardComp extends CCComp { comp }; comp.bindData(eid, model); + comp.setBattlePhase(this.isBattlePhase); this.heroInfoItems.set(eid, item); this.relayoutHeroInfoPanels(); this.updateHeroInfoPanel(item); @@ -881,6 +894,7 @@ export class MissionCardComp extends CCComp { comp: HInfoComp }) { item.comp.refresh(); + item.comp.setBattlePhase(this.isBattlePhase); } private relayoutHeroInfoPanels() {