Represents query for entities that match a list of types that is cached and observable
Queries can be strongly typed by supplying a type union in the optional type parameter
const queryAB = new ex.Query<ComponentTypeA | ComponentTypeB>(['A', 'B']);
Add an entity to the query, will only be added if the entity matches the query types
Removes all entities and observers from the query
Returns a list of entities that match the query
Optional
Optional sorting function to sort entities returned from the query
Returns whether the entity's types match query
Returns whether the list of ComponentTypes have at least the same types as the query
Broadcasts a message to all observers and callbacks
Register an observer to listen to this observable
If the entity is part of the query it will be removed regardless of types
Register a callback to listen to this observable
Remove an observer from the observable
Remove a callback that is listening to this observable
Represents query for entities that match a list of types that is cached and observable
Queries can be strongly typed by supplying a type union in the optional type parameter