Skip to content

Home > @esengine/ecs-framework-monorepo > ComponentIndexManager

ComponentIndexManager class

组件索引管理器

使用统一的组件索引实现,自动优化查询性能。

Signature:

typescript
export declare class ComponentIndexManager

Constructors

Constructor

Modifiers

Description

(constructor)()

Constructs a new instance of the ComponentIndexManager class

Methods

Method

Modifiers

Description

addEntity(entity)

添加实体到索引

clear()

清空索引

getStats()

获取索引统计信息

query(componentType)

查询包含指定组件的实体

queryMultiple(componentTypes, operation)

批量查询多个组件

removeEntity(entity)

从索引中移除实体

基于 MIT 许可证发布