Here is an idea for a pause method that has not been used as far as i can see.
Tell me what you think
1 | if (buttonPressed()) { Greenfoot.setSpeed( 0 ); } |
1 | if (buttonPressed()) { Greenfoot.setSpeed( 0 ); } |
1 | if (buttonPressed()) { Greenfoot.setSpeed(what speed you want); } |
1 2 3 4 5 | boolean anyButton = false ; while (!anyButton) { anyButton = Greenfoot.mousePressed( null ); } |
1 2 3 4 5 | String myKey = "" ; while (myKey = "" ) { myKey = Greenfoot.getKey(); } |