refactor(skill config): 统一技能图标资源路径并清理废弃技能
1. 修正预加载的图集资源路径 2. 批量更新所有技能的图标为统一命名的资源 3. 删除冗余的废弃技能配置条目 4. 为场地技能配置新增图标字段并补全对应资源路径
This commit is contained in:
@@ -283,13 +283,13 @@ export class SingletonModuleComp extends ecs.Comp {
|
||||
* 在游戏载入早期调用,预加载常用图集
|
||||
*/
|
||||
preloadCommonAssets() {
|
||||
resources.load("gui/uicons", SpriteAtlas, (err, atlas) => {
|
||||
resources.load("gui/ui3", SpriteAtlas, (err, atlas) => {
|
||||
if (!err && atlas) {
|
||||
// 增加引用计数,防止图集被引擎自动垃圾回收(GC)导致底层 spriteFrames 为 null
|
||||
atlas.addRef();
|
||||
this.uiconsAtlas = atlas;
|
||||
} else {
|
||||
mLogger.error(this.debugMode, 'SMC', "预加载 gui/uicons 图集失败:", err);
|
||||
mLogger.error(this.debugMode, 'SMC', "预加载 gui/ui3 图集失败:", err);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user