This site requires JavaScript, please enable it in your browser!
Greenfoot back
ZagreusCat
ZagreusCat wrote ...

2022/12/11

My Code my wont Compile

ZagreusCat ZagreusCat

2022/12/11

#
So ive tried to set a game over screen tho i kinda cant get it to work :( Does anybody got any suggestions on what i could do?
 public void act()
    {
        if (getObjects(Bacteria.class).isEmpty())
        Greenfoot.stop();
        
        if(Greenfoot.stop())Greenfoot.setWorld(new GameOverScreen());
    }
Super_Hippo Super_Hippo

2022/12/11

#
For a start, put line 4 in a { } block and put line 6 into the same block without the condition.
You need to login to post a reply.