Skip to content

Systems to handle disjoint sets of components, or optional components #77

Closed Answered by minecrawler
cij11 asked this question in Q&A
Discussion options

You must be logged in to vote

Is it correct to say that "For an entity to be handled by a system, it must have all the components specified in the query"?

Not quite. A query can have operators, which are documented in the Readme. For example WithOut(Counter) would return all entities without a Counter.

how would you formulate a query for a system where entities with one set of components interacted with entities with a different set of components?

If you want to query two different sets, make two different queries. You can have as many queries as you want per System. Then all you have to do is match the results in your System.

For example, one set of components has a 'Sensor' system, but no 'Body'. Another set ha…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by minecrawler
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
2 participants