Home > @esengine/ecs-framework-monorepo > EntityQueryBuilder > forEach
EntityQueryBuilder.forEach() method
对所有匹配的实体执行指定操作
Signature:
typescript
forEach(action: (entity: Entity) => void): void;
Parameters
Parameter | Type | Description |
---|---|---|
action | (entity: Entity) => void | 要执行的操作函数,接收匹配的实体作为参数 |
Returns:
void