In a game I’m making I was about to add a MovementEventHandler
, with events like “pre-character-movement” and “post-character-movement”. But this class will do exactly the same as a future CurrencyChangeEventHandler
.
Should I just be creating a GameEventHandler
, which just handles arbitrary event names?
One of the trade offs I can imagine for that is potential clashes in event names, but that’s easily handled by namespacing the names of events (prefixing them with something).
The benefit is fewer objects hanging around the service container.
2