feat(game): 重构卡牌技能关联逻辑,调整游戏UI布局

为CardConfig新增skill字段,支持卡牌独立关联技能UUID
重构SCardComp与SkillBoxComp的技能获取逻辑,修复技能图标与配置读取问题,修正组件参数注释
调整GameSet中的游戏地平线坐标,优化多个场景与UI预制体的布局位置
移除部分预制体中的冗余配置项,清理无效代码
This commit is contained in:
panFD
2026-06-04 23:12:57 +08:00
parent c1f1aea387
commit 500ba03eb9
10 changed files with 1608 additions and 1431 deletions

View File

@@ -251,7 +251,8 @@ export class SCardComp extends CCComp {
});
});
const skill = SkillSet[this.card_uuid];
const s_uuid = this.cardData.skill ?? this.card_uuid;
const skill = SkillSet[s_uuid];
const skillCard = CardPoolList.find(c => c.uuid === this.card_uuid);
const card_lv = Math.max(1, Math.floor(this.cardData.card_lv ?? 1));
const spSuffix = card_lv >= 2 ? "★".repeat(card_lv - 1) : "";
@@ -271,7 +272,7 @@ export class SCardComp extends CCComp {
if (iconNode) {
iconNode.setScale(new Vec3(1, 1, 1));
this.clearIconAnimation(iconNode);
const iconId = skill?.icon || `${this.card_uuid}`;
const iconId = skill?.icon || `${s_uuid}`;
this.updateIcon(iconNode, iconId);
}
}