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

2018/4/15

Game Over when it down

KKobra KKobra

2018/4/15

#
How can you make a game screen about when Y character to greater than 399, what is it when it's coming off the screen? I was trying this way public void playerDie() { int yValue = getY(); if (yValue >= 399) { Greenfoot.setWorld(new GameOver()); } }
danpost danpost

2018/4/15

#
KKobra wrote...
How can you make a game screen about when Y character to greater than 399, what is it when it's coming off the screen? I was trying this way << Code Omitted >>
Nothing seems wrong with the code given. Are you calling playerDie from the act method of the class?
You need to login to post a reply.