- Home /
Question by
John-Strife · Jul 15, 2016 at 11:13 AM ·
eventeventsystemeventsevent triggering
Correct way to send an event to a specific enemy
For my game I've implemented a message system with an Event Manager based on the one in this tutorial, but I have some doubts about implementing some functions. This system is great for triggering multiple objects on the same condition, but what if I wanted to trigger a single object? For example: my character punches, detects if there's an enemy in the range of the punch, and wants to trigger the "IsHit" method on that enemy only. What's the best way to do that keeping the structure of the game clean and event-oriented?
Comment