Simple Game Scenes
In this example we'll set up a simple structure for a game to pass from, for example, a title screen to the game itself. This can also be called game states.
enum GAME_SCENE
{
SCENE_TITLE,
SCENE_GAME
};enum GAME_SCENE currentScene;void Init()
{
currentScene = SCENE_TITLE;
}void runSceneTitle()
{
//TODO: add Title code
}
void runSceneGame()
{
//TODO: add Game code
}

Last updated