Home > @esengine/ecs-framework-monorepo > EntityQueryBuilder > withAny
EntityQueryBuilder.withAny() method
添加至少包含一个的组件条件
返回的实体必须至少包含其中一个指定的组件类型。
Signature:
typescript
withAny(...componentTypes: ComponentType[]): EntityQueryBuilder;
Parameters
Parameter | Type | Description |
---|---|---|
componentTypes | 组件类型列表 |
Returns:
查询构建器实例,支持链式调用