Hello all,
How do I change this code so that the objects will be removed when they hit the left edge of the screen (rather then the right)?
public void act() { if (this.atWorldEdge()==true) { World world; world = getWorld(); world.removeObject(this); return; } } public boolean atWorldEdge() { if (getX() > getWorld().getWidth() - getImage().getWidth() || getY() > getWorld().getHeight() - getImage().getHeight()) { return true; } else { return false; } }