feat: 新增卡牌自定义图标功能,优化图标加载逻辑
1. 为所有卡牌配置添加icon字段,支持自定义指定图集内的图标 2. 重构列表组件与卡片组件的图标获取逻辑,优先使用自定义图标 3. 更新预加载的图集资源从ui3改为ui6,适配新图标图集 4. 调整弹窗预制体尺寸与图集引用,适配新的图标资源系统
This commit is contained in:
@@ -181,9 +181,9 @@ export class EquipListComp extends CCComp {
|
||||
}
|
||||
}
|
||||
|
||||
// 图标(取第一个 field 词条的图标)
|
||||
// 图标(优先用卡牌自定义 icon,否则取第一个 field 词条图标)
|
||||
if (this.icon_node && fields.length > 0) {
|
||||
const iconId = FieldSkillSet[fields[0]]?.icon || "";
|
||||
const iconId = this.cardData.icon || FieldSkillSet[fields[0]]?.icon || "";
|
||||
this.updateIcon(this.icon_node, iconId);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user