- Home /
Question by
Ok_Computer · Apr 21, 2017 at 04:43 PM ·
eventdelegate
How to send a message that specifically targets a single listener amongst a group
I have enemies in my scene, and in "EnemyHealth" scritp have a method "TakeDamage". I want to use c# delegate/event in "PlayerAttack" script to damage the specifically enemy. But these same enemies(prefabs) all have "TakeDamage" method subscribed the delegate/event which in "PlayerAttack" script, once I fire the delegate/event, all the enemies will take damage.
So, how to send a message to a specifically target ?
Comment
Your answer
Follow this Question
Related Questions
Navmesh event on navigation end 0 Answers
Question regarding events and event managers. 2 Answers
Play an Animation through a Script 2 Answers
Generic Triggers and Actions 0 Answers
How to make Delegates/Events survive assembly reload? 3 Answers