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 N5110 ShiftReg PinDetect
Diff: GameOver.h
- Revision:
- 17:d6a3b29cab31
- Child:
- 18:709ea375b0df
diff -r caf613d5b85e -r d6a3b29cab31 GameOver.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/GameOver.h Mon May 11 03:52:18 2015 +0000 @@ -0,0 +1,33 @@ +#ifndef GAME_OVER_H +#define GAME_OVER_H + +/** @file GameOver.h +* @author Andreas Garmannslund +* @date May 2015 +*/ + +#include "State.h" +#include "Resources.h" + +/// State: Game Over +class GameOver : public State +{ + public: + + GameOver(StateManager* fsm, N5110 *lcd, InputManager* input, Sound* sound) + : State(fsm, lcd, input, sound) {init();} + + virtual void update(float dt); /// Update logic + virtual void render(); /// Draw to lcd + + private: + void init(); + static void btnAPress(); /// Interrupt callback function when button A is pressed + static void btnCPress(); /// Interrupt callback function when button C is pressed + + private: + enum GameOverState {SELECT_PLAY, SELECT_MAIN_MENU, LOAD_GAME, LOAD_MAIN_MENU}; // Internal states + static int currentState; /// Current internal state +}; + +#endif \ No newline at end of file