i want if the actor is on a specific Position i want to create a new world
import greenfoot.*;
public class Gateway extends Actor
{
private World gotoWorld;
public Gateway(World world)
{
gotoWorld = world;
setImage(new GreenfootImge(1, 1)); // to make transparent
}
public void act()
{
if (isTouching(Player.class)) Greenfoot.setWorld(gotoWorld);
}
}addObject(new Gateway(new Level2()), 590, 380);