Hello everyone,
I'm coding a little platforming game which contains several levels. To do that, I wrote a "BaseLevel"-class which holds objects which appear in every level (for example a life counter). Then the levels are subclasses of BaseLevel. The levels themselves have a prepare() method, which adds platforms etc. to the world. In my player class, I defined a method which is being called when the player intersects with a "LevelDoor". I use Greenfoot.setWorld(...) to set the new world. Now my question is, how to make it possible to go to the next level. I only get it working with a constant level, like Greenfoot.setWorld(new Level2()). Maybe you can help me.
Thank you
George