Skip to content

Home > @esengine/ecs-framework-monorepo > EntityList > findEntityById

EntityList.findEntityById() method

根据ID查找实体(使用索引,O(1)复杂度)

Signature:

typescript
findEntityById(id: number): Entity | null;

Parameters

Parameter

Type

Description

id

number

实体ID

Returns:

Entity | null

找到的实体或null

基于 MIT 许可证发布