Hello I am currently in the process of making a game and I would like to know how to create a "doorway" for an actor to go through that takes it to the next level. Can someone help?
public class Door extends Actor {
public void act() {
if (isTouching(Character.class) && getWorld().getObjects(Key.class).isEmpty())
Greenfoot.setWorld(new Level2());
}
}