Hi,
how can I get a list of object within a range of 40 and save these objects as a variable or something?
And then: how can I remove all these Objects?
getWorld().removeObjects(getObjectsInRange(40));
// at the top of the file:
import java.util.List;
// somewhere:
List objects = getObjectsInRange(40);
for (Object object : objects) {
if (object instanceof ClassNameToRemove)
getWorld().removeObject((Actor)object);
}List objects = getObjectsInRange(40);
List objects = getObjectsInRange(40, Blocker.class);
getWorld().removeObjects(getObjectsInRange(40, Blocker.class));