is there a way to pause and resume the scenario with the same button? currently i have to hold escape for it to stay paused.
if (Greenfoot.isKeyDown("escape"))
{
pause Pause = new pause();
addObject(Pause,500,250);
change="space";
while (!"escape".equals(change))
{
change=Greenfoot.getKey();
Greenfoot.delay(1);
if(Greenfoot.isKeyDown("z"))
{Greenfoot.setWorld(new menu());
}
}
removeObject(Pause);
}

