I am making a game that has different levels. i want my game to move to a different world when my actor 'man' reaches the door. what code do i use?
if(getOneIntersectingObject(man.class) != null) // change man to the name of your char { Greenfoot.setWorld(new Level2); // change Level2 with the name of the second world }
Greenfoot.setWorld(new Level2());