Skip to content

Home > @esengine/ecs-framework-monorepo > EntityManager > queryWithComponentIndex

EntityManager.queryWithComponentIndex() method

使用组件索引进行多组件查询

Signature:

typescript
queryWithComponentIndex(componentTypes: ComponentType[], operation: 'AND' | 'OR'): Set<Entity>;

Parameters

Parameter

Type

Description

componentTypes

ComponentType[]

组件类型数组

operation

'AND' | 'OR'

查询操作:'AND' 或 'OR'

Returns:

Set<Entity>

匹配的实体集合

基于 MIT 许可证发布