mirror of
https://gitee.com/dgflash/oops-plugin-framework.git
synced 2026-05-18 04:06:09 +08:00
修复ECSEntity释放时,未自动释放子ECSEntity的问题
This commit is contained in:
@@ -251,10 +251,14 @@ export class ECSEntity {
|
||||
this.remove(comp, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* 销毁实体,实体会被回收到实体缓存池中。
|
||||
*/
|
||||
/** 销毁实体,实体会被回收到实体缓存池中 */
|
||||
destroy() {
|
||||
if (this._children) {
|
||||
this._children.forEach(e => {
|
||||
e.destroy();
|
||||
});
|
||||
}
|
||||
|
||||
this.compTid2Ctor.forEach(this._remove, this);
|
||||
destroyEntity(this);
|
||||
this.compTid2Obj.clear();
|
||||
|
||||
Reference in New Issue
Block a user