Can someone plz tell me how to create a game over screen for when both of my players die. Also, can someone put in step by step I'm kinda new with this


public void started() { if ( ! getObjects(GameOver.class).isEmpty() ) Greenfoot.stop(); }
import greenfoot.*; /** * Write a description of class GameOverScreen here. * * @author (your name) * @version (a version number or a date) */ public class GameOverScreen extends World { /** * Constructor for objects of class GameOverScreen. * */ public GameOverScreen() { // Create a new world with 600x400 cells with a cell size of 1x1 pixels. super(600, 400, 1); prepare(); } /** * Prepare the world for the start of the program. That is: create the initial * objects and add them to the world. */ private void prepare() { Back_button back_button2 = new Back_button(); addObject(back_button2, 294, 333); GameOverText gameovertext = new GameOverText(); addObject(gameovertext, 309, 175); gameovertext.setLocation(300, 176); } }
public void started() { if ( ! getObjects(GameOver.class).isEmpty() ) Greenfoot.stop(); }