I am using the CollisionDetector module from the Asteroids example,
but I have different types of objects, and I initialize the detector like this:
The problem with this is that when I check for a collision later, it doesn't know if it is comparing MyRect against the Dogs or the Cars. Short of setting up a different CollisionDetector Module for each type of object, is there a way for the Detector to return the specific object (or at least which LIST the object comes from) that MyRect has collided with?
This is important, because the result of the collision is determined by the type of object that MyRect has collided with.
-Sterling
but I have different types of objects, and I initialize the detector like this:
B4X:
collision.Initialize(leroyBd.DestRect, game.Dogs, 10, 10 * GameUtils.scale)
collision.Initialize(leroyBd.DestRect, game.Cars, 10, 10 * GameUtils.scale)
The problem with this is that when I check for a collision later, it doesn't know if it is comparing MyRect against the Dogs or the Cars. Short of setting up a different CollisionDetector Module for each type of object, is there a way for the Detector to return the specific object (or at least which LIST the object comes from) that MyRect has collided with?
This is important, because the result of the collision is determined by the type of object that MyRect has collided with.
-Sterling