Killer + assistance id for shooter game


I have something like ApplyDamage (hp system on enemy) and Shoot (attack system on player).
Any idea to develop a killer id for +1 score to player(killer)? And for +1 (to killer and assistance) for cooperative attacks?

Thx for read. Thx for help.

You should use an event system, similar to c#. You launch an event by giving the sender and event parameters. That way you would only have to see who fired the bullets to update the scores.

The sender can be of type System.Object, Unity.Engine.Object or Unity.Engine.GameObject, then you would get some kind of id (GetHash?) to identify the player/enemy.