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

@@ -118,22 +118,24 @@ export class SkillBoxComp extends CCComp {
* 2. 更新 UI 显示(图标 + 次数)。
* 3. 即时技能立即触发一次;若次数已满则延迟销毁。
*
* @param uuid 技能 UUID
* @param uuid 卡牌 UUID
* @param card_lv 技能卡等级
*/
init(uuid: number, card_lv: number) {
this.s_uuid = uuid;
this.card_lv = card_lv;
// 查询触发配置
const config = CardPoolList.find(c => c.uuid === uuid);
if (config) {
this.s_uuid = config.skill ?? uuid; // 获取实际的技能 UUID
this.is_instant = config.is_inst ?? true;
this.trigger_times = config.t_times ?? 1;
this.trigger_interval = config.t_inv ?? 0;
this.keep_waves = config.keep_waves ?? 0;
this.overrides = config.overrides;
this.field = config.field || [];
} else {
this.s_uuid = uuid;
}
this.current_trigger_times = 0;