* @zh 更新World中的所有激活Scene * @en Update all active scenes in World * * @internal Called by Core.update()
()
| 400 | * @internal Called by Core.update() |
| 401 | */ |
| 402 | public updateScenes(): void { |
| 403 | if (!this._isActive) { |
| 404 | return; |
| 405 | } |
| 406 | |
| 407 | for (const sceneName of this._activeScenes) { |
| 408 | const scene = this._scenes.get(sceneName); |
| 409 | scene?.update?.(); |
| 410 | } |
| 411 | |
| 412 | if (this._config.autoCleanup) { |
| 413 | this.cleanup(); |
| 414 | } |
| 415 | } |
| 416 | |
| 417 | /** |
| 418 | * 销毁World |
no test coverage detected