I'm making a game where the spaceship can pick up astronaughts and is destroyed by asteroids. I have an end screen when you're killed, but I can't figure out how to add a counter that displays on the end scene.
public void remove() { Actor Ship; Ship = getOneObjectAtOffset(0, 0, Ship.class); if (Ship != null) { World world; world = getWorld(); world.removeObject(Ship); world.addObject(new End(), world.getWidth()/2, world.getHeight()/2); world.addObject(new Counter(), world.getWidth()/2, world.getHeight()/2); Greenfoot.stop(); }}