Query¶
Type
Query matches entities that have every given component and Pair. World.Query returns one typed by the components it reads (Query1 through Query8), and Query has the members they all share. #query is the number of matched entities, and for e, a, b in query do visits each one with the values of its queried components. query:Optional(component) adds a component that a matched entity may lack; it reads as nil there.
Column¶
Column returns the Column of a queried component or Pair.
Entities¶
Entities returns the Column of matched entities.
With¶
With adds a required component or Pair and returns the query (up to 8 terms total).
Example
Without¶
Without excludes entities that have a component or Pair and returns the query.
Example
IncludeInactive¶
IncludeInactive returns a query that also matches inactive entities.
System¶
System registers fn under name and runs it on every tick with the query and the frame time in seconds. Pass a phase to pick when it runs and after to order it after the system with that name.