* 更新场景
()
| 511 | * 更新场景 |
| 512 | */ |
| 513 | public update() { |
| 514 | this.epochManager.increment(); |
| 515 | ProfilerSDK.beginFrame(); |
| 516 | const frameHandle = ProfilerSDK.beginSample('Scene.update', ProfileCategory.ECS); |
| 517 | |
| 518 | try { |
| 519 | ComponentPoolManager.getInstance().update(); |
| 520 | this.entities.updateLists(); |
| 521 | const systems = this.systems; |
| 522 | |
| 523 | this._runSystemPhase(systems, 'update', 'Systems.update'); |
| 524 | this._runSystemPhase(systems, 'lateUpdate', 'Systems.lateUpdate'); |
| 525 | this.flushCommandBuffers(systems); |
| 526 | } finally { |
| 527 | ProfilerSDK.endSample(frameHandle); |
| 528 | ProfilerSDK.endFrame(); |
| 529 | } |
| 530 | } |
| 531 | |
| 532 | /** |
| 533 | * @zh 执行系统的指定阶段 |
nothing calls this directly
no test coverage detected