Skip to content
This repository was archived by the owner on Sep 4, 2025. It is now read-only.
This repository was archived by the owner on Sep 4, 2025. It is now read-only.

Add Entity::ListensTo(message_t message). #26

@mjstahlberg

Description

@mjstahlberg

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions