Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Diff: Game/Game.cpp
- Revision:
- 28:f8ff7c8c1627
- Parent:
- 27:e46af658c67a
- Child:
- 29:4a02f0bae202
--- a/Game/Game.cpp Thu Apr 04 20:13:39 2019 +0000 +++ b/Game/Game.cpp Thu Apr 04 21:47:00 2019 +0000 @@ -8,7 +8,6 @@ gamepad.init(); renderer.init(); resetScene(); - selectDisable = false; help = -1; input.x = 0; input.bCooldown = input.yCooldown = input.aCooldown = false; @@ -21,7 +20,7 @@ } void Game::run(){ - backToMenu = true; + inHomeMenu = true; score = 0; deathMenuSelection = true; playing = true; //set game state to playing and death screen selection to 'restart' @@ -31,7 +30,7 @@ if(help > -1){ helpScreen(); } - else if(backToMenu){ + else if(inHomeMenu){ homeScreen(); } else{ @@ -123,7 +122,7 @@ } else if(!deathMenuSelection && input.bButton){ //if bottom option highlighted and b pressed then go to home screen resetScore(); - backToMenu = true; + inHomeMenu = true; } } @@ -135,7 +134,7 @@ homeSelection++; } if (input.bButton && homeSelection == 0){ //if top highlighted and b pressed then start game - backToMenu = false; + inHomeMenu = false; } else if(input.bButton && homeSelection == 1){ //if bottom highlighted and b pressed then exit game help = 0;