Hello,
I've been making my way through Greenfoot, learning as I go, and creating some pretty cool scenarios along the way.
So far, in order to present the user with multiple game levels, I have been using a crude system that uses an if statement to load appropriate assets. For example:
public void levelLoader (int level)
if (level == 1)
{
someArrayOfActors= new mobArray;
someArrayOfActors = new Monster("Some", "Random", 123, "Constructor Call Fields");
// etc.
}
Overall, it works, but I can't help feeling that I'm producing very crude code.
My understanding is that there is no file system available from Greenfoot.
In my first project, I added the level loader as a method in my world. For my second project, I'm contempating a Level class that would house the crude code, load the levels, and then pass a few arrays of objects back to my world to store and process. This will be quite a little coding task, so I thought I would ask for input before I got started.
Many thanks in advance :)