556
Support / Java suggestion needed
« on: March 04, 2008, 06:25:13 pm »
I was wondering if someone would have a suggestion for this. My gravity objects will have an active property. When the object is active, I want it to be tested in the game loop for gravity, but not tested when it is not active. So, what I have in mind, but am not sure how to implement, is a container for active objects. This would be accessible from the main game loop. The gravity objects would add themselves to this container when they are active and remove themselves when they are not active. How could I make these objects have access to the container in the main class?