void GameStateManager::goToWinScreen() { currentGameState = GS_WIN_SCREEN; if (isWorldRenderable()) unloadCurrentLevel(); //graphics->clearWorldTextures(); }
void GameStateManager::goToGameOver() { currentGameState = GS_GAME_OVER; if (isWorldRenderable()) unloadCurrentLevel(); //graphics->clearWorldTextures(); }
/* shutdown - this method is called when the user wants to quit the application. This method updates the game state such that all world resources are released and the game loop does not iterate again. */ void GameStateManager::shutdown() { // MAKE SURE THE GAME LOOP DOESN'T GO AROUND AGAIN currentGameState = GS_EXIT_GAME; // CLEAR LEFT OVER DATA if (isWorldRenderable()) unloadCurrentLevel(); }