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

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

View File

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

View File

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