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

2012/12/29

Objects that scroll from side to side

csrgamer csrgamer

2012/12/29

#
I have a question, I have an ocean scene and I want waves to constantly scroll accross the top, constantly going off one side and appearing on the opposite side. Could somone help me out?
danpost danpost

2012/12/29

#
Use a rotating counter (from zero to width of the world) to be the offset at which to draw the ocean scene on the main image each act cycle. You will need to draw the image twice, once at the offset of the counter and once at the offset of the counter minus the width of the image.
You need to login to post a reply.