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.
28406 views / 85 in the last 7 days
14 votes | 0 in the last 7 days
This scenario is a member of: Scenario showcase