MCPcopy Create free account
hub / github.com/esengine/esengine / queryAll

Method queryAll

packages/core/src/ECS/Scene.ts:1003–1005  ·  view source on GitHub ↗

* 查询拥有所有指定组件的实体 * * @param componentTypes - 组件类型数组 * @returns 查询结果 * * @example * ```typescript * const result = scene.queryAll(Position, Velocity); * for (const entity of result.entities) { * const pos = entity.getComponent(Position); * cons

(...componentTypes: ComponentType[])

Source from the content-addressed store, hash-verified

1001 * ```
1002 */
1003 public queryAll(...componentTypes: ComponentType[]): { entities: readonly Entity[] } {
1004 return this.querySystem.queryAll(...componentTypes);
1005 }
1006
1007 /**
1008 * 查询拥有任意一个指定组件的实体

Calls

no outgoing calls

Tested by

no test coverage detected