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

Method update

packages/core/src/ECS/SceneManager.ts:256–266  ·  view source on GitHub ↗

* 更新场景 * * 应该在每帧的游戏循环中调用。 * 会自动处理延迟场景切换。 * * @example * ```typescript * function gameLoop(deltaTime: number) { * Core.update(deltaTime); * sceneManager.update(); // 每帧调用 * } * ```

()

Source from the content-addressed store, hash-verified

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 * 销毁场景管理器

Callers

nothing calls this directly

Calls 3

setSceneMethod · 0.95
updateGlobalSystemsMethod · 0.45
updateScenesMethod · 0.45

Tested by

no test coverage detected