This site requires JavaScript, please enable it in your browser!
Greenfoot
Username
Password
Remember Me?
Sign Up, Lost Password
Activity
About
Documentation
Download
Discuss
Scenarios
asdfvckyeol
wrote ...
2019/5/13
isTouching
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
2019/5/13
#
Is this code in the Trash class? Is the showGameOver method called from the Trash's act method?
asdfvckyeol
2019/5/15
#
yes but it doesn't work
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.
X