I have a scrolling background and I have placed my coins in it. After that scrolls, all the coins bunch tot the side if I don't get them, how do I fix this?
if (getX() < 20) {//or getX() > getWorld().getWidth() - 20 if you want to delete the coins at the right side;
getWorld().removeObject(this);
return;
}if (getX() < 20) {
setLocation(getWorld().getWidth()-20, getY());
}