I have been trying to make a game over screen but all my attempts keep failing. could you give me a few tips?
Actor Crab;
Crab = getOneObjectAtOffset(0,0, Crab.class);
if (Crab != null)
{
World world = getWorld();
world.removeObjects(world.getObjects(null));
world.addObject(new GameOver(), world.getWidth()/2, world.getHeight()/2);
Greenfoot.stop();
