This site requires JavaScript, please enable it in your browser!
Greenfoot back
Chaveron
Chaveron wrote ...

2013/12/11

Steady image

1
2
Chaveron Chaveron

2013/12/12

#
Yea sorry, I forgot that part. public void setLocation(int x, int y) { int width = getWorld().getWidth(); int height = getWorld().getHeight(); while (x >= width) { x -= width; } while (x < 0) { x += width; } while (y >= height) { y -= height; } while (y < 0) { y += height; } super.setLocation(x, y); } But I found my problem already. I just forgot to paste that code into the actual code. Thanks so much for your help!
You need to login to post a reply.
1
2