HELP PLZ...
ok so in the bullet class, i have set the atWorldEdge information. when i say:
if (atWorldEdge())
{
getWorld().removeObject(this);
}
my bullets still aren't being removed...why?
thanks
/** * Act - do whatever the Bullet wants to do. This method is called whenever * the 'Act' or 'Run' button gets pressed in the environment. */ public void act() { move(10); } public void AtWorldEdge() { if (atWorldEdge()) { getWorld().removeObject(this); } } public boolean atWorldEdge() { if(getX() < 10 || getX() > getWorld().getWidth() - 10) return true; if(getY() < 10 || getY() > getWorld().getHeight() - 10) return true; else return false; } }