Scene Life Time
Learn how to control your game scene life time
Pause and Resume your Game
The nero::Scene class offers three methods two handle the Pause State of your Game. You can pause your game, resume your game and check if the game is paused at any moment. Pausing your game will stop all activities inside your Game World, it’s basically like stopping time. Your Game Screens (Menus) are not affected during a pause, you can still display any screen and interact with it.
void pauseScene(); //Pause your game void resumeScene(); //Resume your game bool isScenePause(); //Check is the game is paused
Reset your Game
The nero::Scene class offers a method to reset your Game. Resetting your Game will destroy you current Game instance and re-create a new one. Basically the Engine will destroy your Game Scene and Instantiate another one. As shown in Scene Life Cycle, this means that the Init() methods will be called again.
void resetScene(); //Destroy and rebuild your game
Quit your Game
If you want to exit your Game completely and close the game window you can call the nero::Scene method quitScene().
void quitScene(); //Exit the Engine