feat: 新增卡牌自定义图标功能,优化图标加载逻辑

1. 为所有卡牌配置添加icon字段,支持自定义指定图集内的图标
2. 重构列表组件与卡片组件的图标获取逻辑,优先使用自定义图标
3. 更新预加载的图集资源从ui3改为ui6,适配新图标图集
4. 调整弹窗预制体尺寸与图集引用,适配新的图标资源系统
This commit is contained in:
pan
2026-07-27 10:41:53 +08:00
parent 14a41dbcc1
commit 903ec42905
13 changed files with 6411 additions and 2610 deletions

View File

@@ -218,10 +218,12 @@ export class ItemListComp extends CCComp {
}
}
// 图标:装备取第一个 field 词条图标,商品取技能图标
// 图标:优先用卡牌自定义 icon装备取第一个 field 词条图标,商品取技能图标
if (this.icon_node) {
let iconId = "";
if (isEquip) {
if (this.cardData.icon) {
iconId = this.cardData.icon;
} else if (isEquip) {
const fields = this.cardData.field || [];
if (fields.length > 0) {
iconId = FieldSkillSet[fields[0]]?.icon || "";