My code was working before when the argument of the if statement was based on where the mouse was, but now after I have changed it, the scenario stops when switching to a different world. What can I do to make the scenario not pause?
World cubbiesPic = new cubbies();
if(Greenfoot.isKeyDown("shift") &&
player.getX() >= 450 && player.getX() <= 550 &&
player.getY() <= 250 && player.getY() >= 150)
{
Greenfoot.setWorld(cubbiesPic);
}
