I've got a Player, a Weapon and a Bullet Class.
I want to know which player shoots which player. ( later with which weapon)
I find some Code like:
bullet.Body.OnCollision += OnBulletCollision;
private bool OnBulletCollision(Fixture fix1, Fixture fix2, FarseerPhysics.Dynamics.Contacts.Contact contact)
toremove = true;
// Category 10 is the Player Category
if (fix2.CollisionCategories == Category.Cat10 )
with it :
i can Remove every Bullet which was shot.
i know if a player where hit by a bullet.
but how can i return which player hits which player.
so the second player could be "killed"
Example of Displaying this ( in Teeworlds) :