Roshan123 wrote...
Do i need to make another world
// global
private String key;
private int timer;
// in act
if (key != null)
{
if (++timer == 100)
{
switch ("1234".indexOf(key))
{
case 1: Greenfoot.setWorld(new MyWorld()); break;
case 2: Greenfoot.setWorld(new Help(this)); break;
case 3: Greenfoot.setWorld(new Game(true)); break;
case 4: Greenfoot.setWorld(new Game(false)); break;
}
}
return;
}
key = Greenfoot.getKey();
if (key != null && "1234".indexOf(key) < 0) key = null;