Hey again!
I've made 2 separate systems, an ECS and a Collision detection system for a game. I want an event handling system for handling the communication between components and game management systems (collision detection, ECS and so on). After a bit of prototyping and thinking I've come to two separate ways I can handle this and I'm just curious as of which of these (or possibly any other way) is better.
1. I can have the event handling system deal with entities and give the event to the entity in question. Once received the entity could distribute the event to its proper components, but I see a problem with event duplication if there is multiple components of the same type on the entity in question, plus I'd rather not have the event (or anyone else who will receive the event), know who else got this event (like a target/receiver list or something inside the event).
2. The second way is that I could reference the components them selves directly within the event handling system, but I find the approach messy in a way (because of maintenance and debugging reasons). In my view the event handling system should keep to handling the events and have minimal interaction with the entities and/or components in question which is the soul purpose of the entity.
If you have any opinions or other ideas/solutions, I'd love to hear and I appreciate any help :)