fix: 调整英雄升级所需数量,优化战斗和UI细节
1. 将英雄升级所需数量从2改为3 2. 调整UI3.plist的边框参数 3. 修改地图精灵帧和图集绑定 4. 优化技能提示框动画:减少停留时间并简化漂移淡出逻辑 5. 修改任务卡牌组件:战斗阶段不再隐藏面板,新增战斗阶段无法召唤英雄的限制,注释掉战斗阶段隐藏抽卡面板的代码 6. 重构hnode.prefab的层级和UI组件,调整等级显示样式
This commit is contained in:
@@ -22325,7 +22325,7 @@
|
||||
"a": 255
|
||||
},
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "cb93c900-b440-4571-91d1-7da1636e3d73@bc0ca",
|
||||
"__uuid__": "6165ffc9-a838-4a33-b569-bdbaaab0e6b4@96e5b",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
"_type": 1,
|
||||
@@ -22340,7 +22340,10 @@
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_useGrayscale": false,
|
||||
"_atlas": null,
|
||||
"_atlas": {
|
||||
"__uuid__": "6165ffc9-a838-4a33-b569-bdbaaab0e6b4",
|
||||
"__expectedType__": "cc.SpriteAtlas"
|
||||
},
|
||||
"_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
@@ -2232,10 +2232,10 @@
|
||||
"height": 190,
|
||||
"rawWidth": 48,
|
||||
"rawHeight": 190,
|
||||
"borderTop": 0,
|
||||
"borderTop": 20,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"borderRight": 1,
|
||||
"packable": true,
|
||||
"pixelsToUnit": 100,
|
||||
"pivotX": 0.5,
|
||||
|
||||
@@ -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,//击退概率
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user