统一World与Scene架构,SceneManager内部使用DefaultWorld

This commit is contained in:
YHH
2025-10-11 14:27:09 +08:00
parent 6e48f22540
commit 5f507532ed
3 changed files with 64 additions and 23 deletions

View File

@@ -183,6 +183,17 @@ export class World {
return Array.from(this._scenes.values());
}
/**
* 移除所有Scene
*/
public removeAllScenes(): void {
const sceneIds = Array.from(this._scenes.keys());
for (const sceneId of sceneIds) {
this.removeScene(sceneId);
}
logger.info(`从World '${this.name}' 中移除所有Scene`);
}
/**
* 设置Scene激活状态
*/