It will take several phases of coding to make our level designs work. The first thing we will do is code the
LevelManager header file. This will allow us to look at and discuss the member variables and functions that will be in the
Next, we will code the
LevelManager.cpp file, which will have all the function definitions in it. As this is a long file, we will break it up into several sections, to code and discuss them.
LevelManager class is complete, we will add an instance of it to the game engine (
Engine class). We will also add a new function to the
loadLevel, which we can call from the
update function whenever a new level is required. The
loadLevel function will not only ...