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

Method updateAll

packages/core/src/Core/ServiceContainer.ts:422–426  ·  view source on GitHub ↗

* 更新所有使用@Updatable装饰器标记的服务 * * 此方法会按优先级顺序遍历所有可更新的服务并调用它们的update方法。 * 所有服务在注册时已经由@Updatable装饰器验证过必须实现IUpdatable接口。 * 通常在Core的主更新循环中调用。 * * @param deltaTime - 可选的帧时间间隔(秒) * * @example * ```typescript * // 在Core的update方法中 * this._serviceContainer.u

(deltaTime?: number)

Source from the content-addressed store, hash-verified

420 * ```
421 */
422 public updateAll(deltaTime?: number): void {
423 for (const { instance } of this._updatableServices) {
424 (instance as IService & { update: (deltaTime?: number) => void }).update(deltaTime);
425 }
426 }
427
428 /**
429 * 获取所有可更新的服务数量

Callers

nothing calls this directly

Calls 1

updateMethod · 0.65

Tested by

no test coverage detected