Hey guys,
I would like to know how to use the removeObject method. I have a shooting system. I have a class Bullet and when the bullet is shot, it has to disappear when it hits the edge of the world (atWorldEdge). However, I can't use removeObjects(), because then all bullets disappear. Only the ones that hit the edge of the world should disappear and the other should keep moving towards the edge (and eventually also disappear).
This is how I use removeObjects() now:
I have to use removeObject, but the compiler tells me that he/she cannot find the symbol removeObject().
if(atWorldEdge()){
getWorld().removeObjects(getWorld().getObjects(Bullet.class));
}
