Report as inappropriate.
Greenfoot now (since verison 2.1) has a new method:
Greenfoot.setWorld (World world)
This can be used to install a new world object to be shown in the main window. This is useful fro creating games with multiple levels (or other scenarios that change substantially at some stage).
This scenario is a small demo showing how this can be used. Just use the "Open in Greenfoot" button to download, and then look at the checkNextLevel() method in the Pengu class. It makes use of 'setWorld(..)' to go to a new level.
37464 views / 80 in the last 7 days
15 votes | 0 in the last 7 days
This scenario is a member of: Scenario showcase
Want to leave a comment? You must first log in.
2011/11/19
2011/11/19
2012/10/24
2013/3/18
2013/6/10
2013/6/10
2013/6/15
2017/9/6
2020/4/9
2024/7/26