Skip to content

Entity event queries #8

Answered by friflo
Danon5 asked this question in Q&A
Discussion options

You must be logged in to vote

hi @Danon5,

Coming from some other modern ECS libraries, I am quite used to being able to use the query API (or something similar) to specify exactly what kind of entities I want to receive in my event handlers. Is there a way to do this natively in FrifloECS? I see OnComponentAdded / Removed, as well as the equivalent for tags, however, those have no restrictions on what components you will be querying.

The intension for OnComponentAdded / OnComponentAdded is to avoid adding / removing event handlers for each component type. The assumption is that the handler will execute the same code independent from the specific added / removed component type.

ComponentType.Type can be used to handl…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Danon5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants