Hey,
in my game i made a menu with a button. When the button was clicked with the mouse it should Change the World and start the game, but nothing happens.... What have i done wrong??
This is the world class of the menu (home):
Thank you very much.
public Home()
{
// Create a new world with 600x400 cells with a cell size of 1x1 pixels.
super(600, 400, 1);
prepare();
}
private void prepare()
{
Button button = new Button();
addObject(button, 420, 300);
return;
}
public void act()
{
if (Greenfoot.mouseClicked(Button.class))
{
Greenfoot.setWorld(new Map());
}
}
