You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 4, 2025. It is now read-only.
An Entity::ListensTo(message_t message) method would be nice to check if a message would be handled without actually sending the message. An usage example would be missiles which should bounce exactly when they can't damage the target that they hit. Right now I'm checking for the presence of a HealthComponent to achieve this but this would break when other entities without a HealthComponent would want to react to the damage that the missile could do. So just like HasComponents, this can be used to find out certain characterstics of the entity at hand.
An
Entity::ListensTo(message_t message)method would be nice to check if a message would be handled without actually sending the message. An usage example would be missiles which should bounce exactly when they can't damage the target that they hit. Right now I'm checking for the presence of aHealthComponentto achieve this but this would break when other entities without aHealthComponentwould want to react to the damage that the missile could do. So just likeHasComponents, this can be used to find out certain characterstics of the entity at hand.