Hugo Hu / Mbed 2 deprecated BRAVEHEART

Dependencies:   mbed N5110 ShiftReg PinDetect

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers GameOver.h Source File

GameOver.h

Go to the documentation of this file.
00001 #ifndef GAME_OVER_H
00002 #define GAME_OVER_H
00003 
00004 /** @file GameOver.h
00005 *   @author Andreas Garmannslund
00006 *   @date May 2015
00007 */
00008 
00009 #include "State.h "
00010 #include "Sprites.h"
00011 
00012 /// State: Game Over
00013 class GameOver : public State
00014 {
00015     public:
00016         /// Create a new GameOver object.
00017         GameOver(StateManager* fsm, N5110 *lcd, InputManager* input, Sound* sound, ShiftReg* shiftreg)
00018                 : State(fsm, lcd, input, sound, shiftreg) {init();}
00019                 
00020         /// Update logic
00021         virtual void update(float dt);
00022         
00023         /// Draw to lcd
00024         virtual void render();          
00025     
00026     private:
00027         /// Setup initial configuration.
00028         void init();
00029         
00030          /// Interrupt callback function when button A is pressed.
00031         static void btnAPress();
00032         
00033         /// Interrupt callback function when button C is pressed.
00034         static void btnCPress();
00035         
00036     private:
00037         /// Internal states
00038         enum GameOverState {SELECT_PLAY, SELECT_MAIN_MENU, LOAD_GAME, LOAD_MAIN_MENU};
00039         
00040         /// Current internal state
00041         static int currentState;    
00042 };
00043 
00044 #endif