QueryManager
Index
Constructors
constructor
Parameters
_world: World
Returns QueryManager
Methods
addComponent
addEntity
Scans queries and locates any that need this entity added
Parameters
entity: Entity<any>
Returns void
addTag
Updates any queries when a tag is added to an entity
Parameters
entity: Entity<any>
tag: string
Returns void
publiccreateQuery
Type parameters
- TKnownComponentCtors: ComponentCtor<Component>
Parameters
requiredComponents: TKnownComponentCtors[]
Returns Query<TKnownComponentCtors>
publiccreateTagQuery
Type parameters
- TKnownTags: string
Parameters
requiredTags: TKnownTags[]
Returns TagQuery<TKnownTags>
removeComponent
removeEntity
Scans queries and locates any that need this entity removed
Parameters
entity: Entity<any>
Returns void
removeTag
Updates any queries when a component is removed from an entity
Parameters
entity: Entity<any>
tag: string
Returns void
The query manager is responsible for updating all queries when entities/components change