Is there a way to get a object to hide when its touching the edge of the world?
(i'm new so if this is dumb question you know why XD)
public boolean AtWorldEdge() { double w=getImage().getWidth()/2,h=getImage().getHeight()/2 return getX()==w || getY()==h || getX()==getWorld().getWidth()-(w+1) || getY()==getWorld().getHeight()-(h+1); }