I want to make a button so that when I click it, my game starts and the button goes away, and then when the game ends the button re-appears and restarts the game. Does anybody know how I can do this?


1 2 3 4 5 6 7 8 | public void clickButton() { if (Greenfoot.mouseClicked( this )) { Greenfoot.setWorld( new Level1()); Greenfoot.playSound( "ButtonSound.mp3" ); } } |