I have in a project a class Collision
, and to make a more efficient detection, I wanted to have access to all instances (objects) of that same class. Is there any easy way to do this?
Edit 1
I did so: I created a class called world
, which stores all objects and collisions, where I have the isColliding
method, which checks the collision between one object and all others, or between two objects.