MCPcopy Create free account
hub / github.com/esengine/esengine / destroy

Method destroy

packages/core/src/ECS/WorldManager.ts:365–381  ·  view source on GitHub ↗

* 销毁WorldManager

()

Source from the content-addressed store, hash-verified

363 * 销毁WorldManager
364 */
365 public destroy(): void {
366 logger.info('正在销毁WorldManager...');
367
368 // 停止所有World
369 this.stopAll();
370
371 // 销毁所有World
372 const worldNames = Array.from(this._worlds.keys());
373 for (const worldName of worldNames) {
374 this.removeWorld(worldName);
375 }
376
377 this._worlds.clear();
378 this._isRunning = false;
379
380 logger.info('WorldManager已销毁');
381 }
382
383 /**
384 * 实现 IService 接口的 dispose 方法

Callers 1

disposeMethod · 0.95

Calls 6

stopAllMethod · 0.95
removeWorldMethod · 0.95
keysMethod · 0.80
clearMethod · 0.65
infoMethod · 0.45
fromMethod · 0.45

Tested by

no test coverage detected