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

2017/8/1

Help??? please

Venbha Venbha

2017/8/1

#
ok, I want to tell you ... When I hit open Ctrl + space keys in the code window, it opens a small tab. in that, I close it and write Greenfoot. and open it again. I has different lists of methods now... and now it has setWorld(World);. I click it and Now it looks like
Greenfoot.setWorld(_world_)
But the point is, What is set world for?? SAMPLE code please!
Super_Hippo Super_Hippo

2017/8/1

#
If your scenario simply consists of one world named MyWorld, you can restart the game like this:
Greenfoot.setWorld(new MyWorld());
If you for example have a menu with button, then the buttons can change the world. Or you can return to the menu if the game is over. In general, the method changes the active world (the one which you see). In the Greenfoot environment, the act method of the active world and of every actor in the active world is executed in each act cycle.
Venbha Venbha

2017/8/1

#
It works!! see link of it... ---> FIRE AND ICE <----
You need to login to post a reply.