public void gameOver() {
DeadWorld deadWorld = new DeadWorld();
Greenfoot.setWorld(deadWorld);
int ypos = getY() +1;
if (ypos >= getWorld().getHeight()) {
Worldspace =getWorld(space);
world.removeObjecs(world.getObjects(null));
world.addObject(new DeadWorld(), world.getWidth()/2, world.getHeight()/2);
Greenfoot.stop();
}
}```
Im trying to make a death screen in my greenfoot game but it doesnt work.
#Greenfoot
3 messages · Page 1 of 1 (latest)