Hello good people. I want to make a simple in-game pause menu where I can toggle it on and off by pressing enter. All this code does is bring up the menu. I've been looking for quite some time and can't seem to find some simple toggle logic to achieve this feat. Some help would be wonderful. :)
public void act()
{
if (Greenfoot.isKeyDown("enter"))
{
setImage("Pause Menu.png");
}
}
}

