hey guys, im new at greenfoot gaming, does anyone know how to create a text box and make it move side to side when it gets to the end of the world using getImage? i tried using if statements and got stuck.
if ((dir == 1 && getX() > getWorld().getWidth()-getImage().getWidth()/2)
|| (dir == -1 && getX() < getImage().getWidth()/2)) dir = -dir;
move(speed*dir);