refactor(heroBox): 优化英雄升级弹窗展示与UI边框

1.  移除英雄升级确认弹窗冗余的英雄名称变量拼接
2.  调整UI元素的边框偏移参数
3.  给英雄属性描述文本添加黑色描边优化显示效果
4.  更新了多个英雄预制件的节点ID与属性覆盖配置
This commit is contained in:
panFD
2026-08-10 10:28:39 +08:00
parent 2b3a68fb2a
commit 222dddbb05
6 changed files with 869 additions and 533 deletions

View File

@@ -172,7 +172,6 @@ export class HeroBoxComp extends CCComp {
}
oops.audio.playEffect("music/button");
const heroName = this.model.hero_name ?? "";
const nextLv = heroLv + 1;
const cost = MissionEconomy.getUpgradeCost(heroLv);
// 金币不足smalltip 气泡提示(挂载金币节点),不弹确认框
@@ -185,7 +184,7 @@ export class HeroBoxComp extends CCComp {
// oops.gui 公共确认窗口(自定义 CommonPrompt内容支持富文本高亮
oops.gui.open(UIID.Window, {
title: `升级英雄`,
content: `<color=#C0392B>${heroName}</color> Lv.${heroLv} → <color=#1E8449>Lv.${nextLv}</color>\n消耗 <color=#E67E22>${cost}</color> 金币\n\n${preview}`,
content: preview,
okWord: "升级",
cancelWord: "取消",
needCancel: true,
@@ -241,7 +240,7 @@ export class HeroBoxComp extends CCComp {
const curDesc = buildSkillDescMoreRich(buildSource(heroLv));
const nextDesc = buildSkillDescMoreRich(buildSource(nextLv));
return [
return `<outline color=#000000 width=2>` + [
`<b>当前 Lv.${heroLv}</b>`,
attrLine(heroLv),
curDesc,
@@ -249,7 +248,7 @@ export class HeroBoxComp extends CCComp {
`<b>升级后 Lv.${nextLv}</b>`,
attrLine(nextLv),
nextDesc,
].filter(s => s !== undefined).join("\n");
].filter(s => s !== undefined).join("\n") + `</outline>`;
}
/** 累加等级额外加成(≤目标等级的所有档位) */