Home > @esengine/ecs-framework-monorepo > ECSFluentAPI > findFirst
ECSFluentAPI.findFirst() method
查找第一个匹配的实体
Signature:
typescript
findFirst(...componentTypes: ComponentType[]): Entity | null;
Parameters
Parameter | Type | Description |
---|---|---|
componentTypes | 组件类型 |
Returns:
Entity | null
实体或null