Skip to content

Home > @esengine/ecs-framework-monorepo > ECSFluentAPI > findFirst

ECSFluentAPI.findFirst() method

查找第一个匹配的实体

Signature:

typescript
findFirst(...componentTypes: ComponentType[]): Entity | null;

Parameters

Parameter

Type

Description

componentTypes

ComponentType[]

组件类型

Returns:

Entity | null

实体或null

基于 MIT 许可证发布