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

2014/5/9

Starting the Game

jmdreyer jmdreyer

2014/5/9

#
How do you start the game by hitting the space bars?
danpost danpost

2014/5/9

#
Create a separate initial world with an act method that sets your game world active when the space bar is pressed. The class can be used as a header screen and it should display instructions (at least to inform that the space bar needs to be pressed).
jmdreyer jmdreyer

2014/5/12

#
Okay I will give it a try thanks.
jmdreyer jmdreyer

2014/5/12

#
what is the code to make it start the next world by hitting space bar?
danpost danpost

2014/5/12

#
"If space key is down, set world to new world".
if (Greenfoot.isKeyDown("space)) Greenfoot.setWorld(new WorldName());
jmdreyer jmdreyer

2014/5/13

#
Thanks for all your help.
You need to login to post a reply.