Okay, I'm looking for a way to do a simple startup graphic -- maybe a PNG Title Screen or something that will display until someone clicks or presses SPACE it moves on and runs the game.


1 2 3 4 5 6 7 8 | public void started() { if (getObjects( null ).isEmpty()) { setGameBackground(); // change background prepare(); // add actors } } |
1 2 | getBackground().clear(); getBackground().fill(); |
1 | getBackground().setColor(java.awt.Color.white); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | public MyWorld() { super ( 640 , 480 , 1 ); // use the following or set the image as default for world setBackground( new GreenfootImage( "titleScreenImageFilename.jpg" )); } public void started() { if (getObjects( null ).isEmpty()) { setBackground( "road.png" ); prepare(); } } |