* 更新场景 * * 应该在每帧的游戏循环中调用。 * 会自动处理延迟场景切换。 * * @example * ```typescript * function gameLoop(deltaTime: number) { * Core.update(deltaTime); * sceneManager.update(); // 每帧调用 * } * ```
()
| 254 | * ``` |
| 255 | */ |
| 256 | public update(): void { |
| 257 | // 处理延迟场景切换 |
| 258 | if (this._nextScene) { |
| 259 | this.setScene(this._nextScene); |
| 260 | this._nextScene = null; |
| 261 | } |
| 262 | |
| 263 | // 通过 World 统一更新 |
| 264 | this._defaultWorld.updateGlobalSystems(); |
| 265 | this._defaultWorld.updateScenes(); |
| 266 | } |
| 267 | |
| 268 | /** |
| 269 | * 销毁场景管理器 |
nothing calls this directly
no test coverage detected