Basically I'm making a game where the player controls a plane and has to avoid the other planes. I have multiple worlds, and am trying to make it so when the plane touches the end of the world Greenfoot will choose which world out of a few to switch to, but I'm not sure how to go about doing it. I'm aware you can't just say or, but the following code is somewhat how I want it to work:
if (isAtEdge()) { Greenfoot.setWorld(new SkyEnemy()); or Greenfoot.setWorld(new SkyEnemyTwo()); or Greenfoot.setWorld(new SkyEnemyThree()); }