Skip to content

Home > @esengine/ecs-framework-monorepo > ComponentStorage > forEach

ComponentStorage.forEach() method

高效遍历所有组件

Signature:

typescript
forEach(callback: (component: T, entityId: number, index: number) => void): void;

Parameters

Parameter

Type

Description

callback

(component: T, entityId: number, index: number) => void

回调函数

Returns:

void

基于 MIT 许可证发布