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

2017/11/9

How to stop the game when the crab dies?

PikaCode10 PikaCode10

2017/11/9

#
I have been trying to get my game to stop when the Crab class dies to something like an Alligator, Lobster, etc. and haven't found a way to program it. I have deleted the previous attempts, so if you may know what to do/what to add on, please let me know. Thanks! (Here's the code I have so far by the way) public class CrabWorld extends World { public CrabWorld() { super(560, 560, 1); GreenfootSound sound = new GreenfootSound("Seinfeld.mp3"); sound.stop(); prepare(); } private void prepare() { (all my presets are here, nothing special) } } I'm decently new, so it's not much. Anyway, if you can help, please do and thanks :D (ps: don't question the seinfeld music xD)
danpost danpost

2017/11/9

#
By deleting previous attempts,, you have not allowed yourself the opportunity to see where you went wrong. Also, you have lost the ability to show any effort. Pity! Re-try, and if failed again, show what you had tried.
You need to login to post a reply.