1、废弃UIMap对象

2、添加弱网情况打开窗口失败的异常事件
This commit is contained in:
dgflash
2024-08-04 19:21:47 +08:00
parent dec5385718
commit 45ac750ebd
8 changed files with 83 additions and 168 deletions

View File

@@ -58,19 +58,7 @@ export class ModuleUtil {
}
/**
* 业务实体上移除界面组件
* @param ent 模块实体
* @param ctor 界面逻辑组件
* @param uiId 界面资源编号
* @param isDestroy 是否释放界面缓存(默认为释放界面缓存)
*/
public static removeViewUi(ent: ecs.Entity, ctor: CompType<ecs.IComp>, uiId: number, isDestroy: boolean = true) {
ent.remove(ctor, isDestroy);
oops.gui.remove(uiId, isDestroy);
}
/**
* 添加界面组件
* 通过资源内存中获取预制上的组件添加到ECS实体中
* @param ent 模块实体
* @param ctor 界面逻辑组件
* @param parent 显示对象父级
@@ -86,4 +74,16 @@ export class ModuleUtil {
ent.add(comp);
node.parent = parent;
}
/**
* 业务实体上移除界面组件
* @param ent 模块实体
* @param ctor 界面逻辑组件
* @param uiId 界面资源编号
* @param isDestroy 是否释放界面缓存(默认为释放界面缓存)
*/
public static removeViewUi(ent: ecs.Entity, ctor: CompType<ecs.IComp>, uiId: number, isDestroy: boolean = true) {
ent.remove(ctor, isDestroy);
oops.gui.remove(uiId, isDestroy);
}
}