(entityId: number)
| 380 | |
| 381 | |
| 382 | public getComponent(entityId: number): T | null { |
| 383 | const index = this.entityToIndex.get(entityId); |
| 384 | if (index === undefined) { |
| 385 | return null; |
| 386 | } |
| 387 | |
| 388 | // 返回 Proxy,直接操作底层 TypedArray |
| 389 | return this.createProxyView(entityId, index); |
| 390 | } |
| 391 | |
| 392 | /** |
| 393 | * 创建组件的 Proxy 视图 |
no test coverage detected