I want to switch the world form the title screen, it runs but it doesn't work. Here is the code:
import greenfoot.*;
import java.awt.Color;
/**
* Write a description of class world here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class world extends World
{
/**
* Constructor for objects of class world.
*
*/
public world()
{
// Create a new world with 600x400 cells with a cell size of 1x1 pixels.
super(500, 500, 1);
}
/**
* Prepare the world for the start of the program. That is: create the initial
* objects and add them to the world.
*/
public void act()
{
world Main = new world();
if(Greenfoot.isKeyDown("e"))
Greenfoot.setWorld(Main);
}
}
