Skip to content

Home > @esengine/ecs-framework-monorepo > ComponentSparseSet > queryByComponent

ComponentSparseSet.queryByComponent() method

查询包含指定组件的所有实体

Signature:

typescript
queryByComponent(componentType: ComponentType): Set<Entity>;

Parameters

Parameter

Type

Description

componentType

ComponentType

组件类型

Returns:

Set<Entity>

包含该组件的实体集合

基于 MIT 许可证发布