fix(map): 修复任务奖励图标加载问题并重构组件逻辑

- 移除 MGetsComp 中未使用的属性和方法,简化组件结构
- 在 MissionGetsComp 中实现动态加载奖励图标功能,支持从 gui/uicons 图集获取
- 调整 get.prefab 结构,分离图标和数字显示节点
- 解决资源加载机制限制,确保动态加载资源正常工作
This commit is contained in:
panw
2026-01-27 16:02:33 +08:00
parent ce6b7bce1e
commit b869e1c33c
4 changed files with 204 additions and 47 deletions

View File

@@ -11,24 +11,17 @@ const { ccclass, property } = _decorator;
@ccclass('MGetsCompComp')
@ecs.register('MGetsComp', false)
export class MGetsCompComp extends CCComp {
get:any = {};
get_uuid:number=0;
get_num:number=0;
start() {
oops.message.on(GameEvent.UpdateCollection, this.updateView, this);
this.updateView();
}
onDestroy() {
oops.message.off(GameEvent.UpdateCollection, this.updateView, this);
}
private updateView() {
}
private updateNodeNum(node: Node, num: number) {
}
/** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */
reset() {