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

2012/12/6

Replacing Worlds

bbwf bbwf

2012/12/6

#
I have a game I'm making and if the Aligator hits the camel it dies. I want the code to switch worlds into a player 2 world if this happens. How would I do this?
danpost danpost

2012/12/6

#
In whatever method is called when the camel dies due to the Aligator hitting it (or at that point in the code), add the following (I am calling your player 2 world 'P2World'):
Greenfoot.setWorld(new P2World());
You need to login to post a reply.