I have this code for removing an object but it only removes the object it's touching. I want to remove all object from the same class at once when an object touches another.
Can someone help me?
public void removeObject(Class clss)
{
Actor actor = getOneObjectAtOffset(0, 0, clss);
if(actor != null) {
getWorld().removeObject(actor);
}
}