fix: 调整英雄升级所需数量,优化战斗和UI细节

1.  将英雄升级所需数量从2改为3
2.  调整UI3.plist的边框参数
3.  修改地图精灵帧和图集绑定
4.  优化技能提示框动画:减少停留时间并简化漂移淡出逻辑
5.  修改任务卡牌组件:战斗阶段不再隐藏面板,新增战斗阶段无法召唤英雄的限制,注释掉战斗阶段隐藏抽卡面板的代码
6.  重构hnode.prefab的层级和UI组件,调整等级显示样式
This commit is contained in:
panw
2026-05-14 10:55:15 +08:00
parent 3f47df2682
commit 9b363cda1c
8 changed files with 3800 additions and 3317 deletions

View File

@@ -22325,7 +22325,7 @@
"a": 255 "a": 255
}, },
"_spriteFrame": { "_spriteFrame": {
"__uuid__": "cb93c900-b440-4571-91d1-7da1636e3d73@bc0ca", "__uuid__": "6165ffc9-a838-4a33-b569-bdbaaab0e6b4@96e5b",
"__expectedType__": "cc.SpriteFrame" "__expectedType__": "cc.SpriteFrame"
}, },
"_type": 1, "_type": 1,
@@ -22340,7 +22340,10 @@
"_fillRange": 0, "_fillRange": 0,
"_isTrimmedMode": true, "_isTrimmedMode": true,
"_useGrayscale": false, "_useGrayscale": false,
"_atlas": null, "_atlas": {
"__uuid__": "6165ffc9-a838-4a33-b569-bdbaaab0e6b4",
"__expectedType__": "cc.SpriteAtlas"
},
"_id": "" "_id": ""
}, },
{ {

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -2232,10 +2232,10 @@
"height": 190, "height": 190,
"rawWidth": 48, "rawWidth": 48,
"rawHeight": 190, "rawHeight": 190,
"borderTop": 0, "borderTop": 20,
"borderBottom": 0, "borderBottom": 0,
"borderLeft": 0, "borderLeft": 0,
"borderRight": 0, "borderRight": 1,
"packable": true, "packable": true,
"pixelsToUnit": 100, "pixelsToUnit": 100,
"pivotX": 0.5, "pivotX": 0.5,

View File

@@ -24,7 +24,7 @@ export enum FightSet {
HEARTPOS=-320,//基地位置 HEARTPOS=-320,//基地位置
HERO_MAX_NUM=6,//英雄最大数量 HERO_MAX_NUM=6,//英雄最大数量
MERGE_MAX=3, //英雄最大等级 MERGE_MAX=3, //英雄最大等级
MERGE_NEED=2, //英雄升级需要的英雄数 MERGE_NEED=3, //英雄升级需要的英雄数
// BACK_RANG=30,//后退范围 // BACK_RANG=30,//后退范围
FiIGHT_TIME=30,//战斗时间 FiIGHT_TIME=30,//战斗时间
// BACK_CHANCE=40,//击退概率 // BACK_CHANCE=40,//击退概率

View File

@@ -335,7 +335,7 @@ export class MissionCardComp extends CCComp {
this.playCoinChangeAnim(v > 0); this.playCoinChangeAnim(v > 0);
} }
/** 战斗开始:收起面板,清空卡牌 */ /** 战斗开始:收起面板,不再强制清空卡牌 */
private onFightStart() { private onFightStart() {
this.isBattlePhase = true; this.isBattlePhase = true;
this.enterBattlePhase(); this.enterBattlePhase();
@@ -432,6 +432,14 @@ export class MissionCardComp extends CCComp {
private onUseHeroCard(event: string, args: any) { private onUseHeroCard(event: string, args: any) {
const payload = args ?? event; const payload = args ?? event;
if (!payload) return; if (!payload) return;
if (this.isBattlePhase) {
payload.cancel = true;
payload.reason = "battle_phase";
oops.gui.toast("战斗阶段无法召唤英雄");
return;
}
const current = this.getAliveHeroCount(); const current = this.getAliveHeroCount();
this.syncMissionHeroData(current); this.syncMissionHeroData(current);
const heroMax = this.getMissionHeroMaxNum(); const heroMax = this.getMissionHeroMaxNum();
@@ -571,10 +579,10 @@ export class MissionCardComp extends CCComp {
* 3. 重新布局槽位 → 从卡池构建 4 张卡 → 分发到槽位。 * 3. 重新布局槽位 → 从卡池构建 4 张卡 → 分发到槽位。
*/ */
private onClickDraw() { private onClickDraw() {
if (this.isBattlePhase) { // if (this.isBattlePhase) {
oops.gui.toast("战斗阶段无法抽卡"); // oops.gui.toast("战斗阶段无法抽卡");
return; // return;
} // }
const cost = this.getRefreshCost(); const cost = this.getRefreshCost();
const currentCoin = this.getMissionCoin(); const currentCoin = this.getMissionCoin();
if (currentCoin < cost) { if (currentCoin < cost) {
@@ -663,15 +671,16 @@ export class MissionCardComp extends CCComp {
private enterBattlePhase() { private enterBattlePhase() {
if (!this.cards_node || !this.cards_node.isValid) return; if (!this.cards_node || !this.cards_node.isValid) return;
this.initCardsPanelPos(); this.initCardsPanelPos();
Tween.stopAllByTarget(this.cards_node); // 战斗阶段不再隐藏抽卡面板
tween(this.cards_node) // Tween.stopAllByTarget(this.cards_node);
.to(this.cardsPanelMoveDuration, { scale: this.cardsHideScale }) // tween(this.cards_node)
.call(() => { // .to(this.cardsPanelMoveDuration, { scale: this.cardsHideScale })
if (this.cards_node && this.cards_node.isValid) { // .call(() => {
this.cards_node.active = false; // if (this.cards_node && this.cards_node.isValid) {
} // this.cards_node.active = false;
}) // }
.start(); // })
// .start();
this.cachedHInfoComps.forEach(comp => { this.cachedHInfoComps.forEach(comp => {
if (comp && comp.isValid) { if (comp && comp.isValid) {

View File

@@ -100,7 +100,7 @@ export class TooltipCom extends CCComp {
break; break;
case TooltipTypes.skill: case TooltipTypes.skill:
const skillConfig = SkillSet[this.s_uuid]; const skillConfig = SkillSet[this.s_uuid];
const skillName = skillConfig ? "<" + skillConfig.name + ">" : ""; const skillName = skillConfig ? skillConfig.name : "";
this.setupLabel("skill", "name", skillName+this.value); this.setupLabel("skill", "name", skillName+this.value);
// this.node.setPosition(v3(this.node.position.x, currentY)); // this.node.setPosition(v3(this.node.position.x, currentY));
this.node.setSiblingIndex(topSiblingIndex); this.node.setSiblingIndex(topSiblingIndex);
@@ -156,12 +156,11 @@ export class TooltipCom extends CCComp {
const isSkill = this.stype === TooltipTypes.skill; const isSkill = this.stype === TooltipTypes.skill;
if (isSkill) { if (isSkill) {
// 技能类型的提示:回弹后停留 0.5 秒,然后向上淡出 // 技能类型的提示:回弹后稍作停留,然后原地快速淡出
t.to(this.popDuration, { scale: v3(sx * 1.2, 1.2, 1) }); t.to(this.popDuration, { scale: v3(sx * 1.2, 1.2, 1) });
t.delay(0.5); t.delay(0.2);
t.parallel( t.parallel(
tween(this.node).by(this.driftDuration, { position: v3(0, moveY, 0) }, { easing: 'sineOut' }), tween(this._uiOpacity).to(this.fadeDuration, { opacity: 0 })
tween(this._uiOpacity).delay(this.driftDuration - this.fadeDuration).to(this.fadeDuration, { opacity: 0 })
); );
} else { } else {
// 2. 漂移阶段 (Drift) & 3. 淡出 (Fade) // 2. 漂移阶段 (Drift) & 3. 淡出 (Fade)