Hi,
I'm looking for a button that resets the entire world.
Example: I press the exit button and my whole greenfoot project starts all over again.
Thanks in advance.
wont work :(
"
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* The screen when Link dies
* @author Andrew Harmon
* @version 5/10/2012
*/
public class GameOverScreen extends UI
{
/**
* Act - do whatever the GameOverScreen wants to do. This method is called whenever
* the 'Act' or 'Run' button gets pressed in the environment.
*/
public void act()
{
PlayerInput();
}
private void PlayerInput (){
if (Greenfoot.isKeyDown("enter")== true){
Greenfoot.setWorld(new LinkWorld());
}
}
}
"