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

2019/5/13

isTouching

asdfvckyeol asdfvckyeol

2019/5/13

#
public void showGameOver(){ if(isTouching(Chef.class)){ Greenfoot.setWorld(new GameOver()); } } I want to flash a GameOver world if the chef or the actor touches the trash but it doesnt work.
Super_Hippo Super_Hippo

2019/5/13

#
Is this code in the Trash class? Is the showGameOver method called from the Trash's act method?
asdfvckyeol asdfvckyeol

2019/5/15

#
yes but it doesn't work
Super_Hippo Super_Hippo

2019/5/15

#
It shouldn't be allowed to write "it doesn't work" without any explanation. Show your Trash class code.
You need to login to post a reply.