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

2012/9/11

levels

Stephon231 Stephon231

2012/9/11

#
how do you make a world go to anouther
Gevater_Tod4711 Gevater_Tod4711

2012/9/11

#
You can use:
Greenfoot.setWorld(/*Name of the world*/);
this will change the world you use
SPower SPower

2012/9/11

#
It isn't totally right wat Gevater is saying, you need an object of a World subclass, like this:
// let's say you wanna switch to an object of the World 'SecondWorld' class:
SecondWorld w = new SecondWorld();
Greenfoot.setWorld(w);

// or a shorter version:
Greenfoot.setWorld(new SecondWorld());
Gevater_Tod4711 Gevater_Tod4711

2012/9/11

#
Oh yes thank you SPower. Of course you need an object from typ world
You need to login to post a reply.