March 2016
Beginner to intermediate
340 pages
6h 51m
English
As the saying goes, all good things must come to an end. If the player doesn't meet the pickup threshold, the game will end, and the game over screen will be displayed. The player can choose to replay the game or exit.
Our last screen is the game over screen. By now, the process should be second nature, so let's try an abbreviated approach:
Sprite* gameOverScreen;
LoadTextures:gameOverScreen = new Sprite(1);
gameOverScreen->SetFrameSize(800.0f, 600.0f);
gameOverScreen->SetNumberOfFrames(1);
gameOverScreen->AddTexture("resources/gameover.png", false);
gameOverScreen->IsActive(true);
gameOverScreen->IsVisible(true);GS_GameOver case in the Update function ...Read now
Unlock full access