Pattern for removal after collision
My game has a main player that fights against multiple (AI) opponents. I need a pattern for collision detection and removal of the damaged opponent (and the projectile that caused the damage.)
The simplest way, though not the most elegant way that I can think of, is to have the main game class create the player and multiple opponents, each with their respective locations. Each of these objects assigns a CollisionDetection object (a bunch of waitOn behavior handlers) to handle the collision, but what I don't see is a way for the resultant collision handler to remove the object from the scene.
Must I pass the scene object to each of the player and opponents so it can request its own removal? Must I centralize the logic to remove objects and have each collided object ask the system to remove it? Is there a pattern for a Collision Detection Manager of some sort?
Any similar game source code would be an ideal reference.
Torin...

