My goal is to check collisions among the actors that are in the Stage.
My question is: is it necessary to maintain a list for each type of actor I have?
Doing that I get 3 problems, 2 bad design problems and 1 exception.
Design problems I don't like:
The Actors used by the player add bullets (another Actor) to the stage. I need to pass my Stage to these Actors as argument in order to add a bullet to the list of bullets, that is held by the Stage.
Each time I need to add an Actor to the Stage, I have to perform 2 add operations, one in the list and one directly to the Stage.
If I check collisions iterating over the lists and I find out that an enemy (another actor) is dead, I need to remove the enemy both from the stage and from the list, but I can't remove it from the list because I get "Concurrent modification exception".
Is there some common design technique to handle this stuff?