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

2019/5/23

Help increasing speed of an object each level

taylor360 taylor360

2019/5/23

#
Hi, I'm pretty new to greenfoot and I need some help. We're making a game for my coding class and I'm creating a version of the game Frogger. There is a frog that needs to cross a busy road in order to get to the opposite side of the screen. Right now I have two levels but the cars are going the same speed. I need to find a way to increase the speed of the cars with each level to increase the difficulty. Thank you!
danpost danpost

2019/5/23

#
taylor360 wrote...
I need to find a way to increase the speed of the cars with each level to increase the difficulty.
Your car class will require an int speed field. Use it for moving and change its value when you change levels.
You need to login to post a reply.