Function getComponentEntityTree
- getComponentEntityTree<T>(engine: Pick<IEngine, "getEntitiesWith">, entity: Entity, component: ComponentDefinition<T & {
parent?: Entity;
}>): Generator<Entity>
-
Parameters
-
engine: Pick<IEngine, "getEntitiesWith">
-
-
Returns Generator<Entity>
Get an iterator of entities that follow a tree structure for a component
Returns
An iterator of an array as [entity, entity2, ...]
Example: