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: StateManager.h
- Revision:
- 17:d6a3b29cab31
- Parent:
- 10:f2488a0ecab7
- Child:
- 19:89c3eeb3761b
--- a/StateManager.h Sun May 10 13:14:33 2015 +0000
+++ b/StateManager.h Mon May 11 03:52:18 2015 +0000
@@ -5,6 +5,8 @@
#include "MainMenu.h"
#include "Game.h"
#include "TitleScreen.h"
+#include "GameOver.h"
+#include "SubmitHighscore.h"
/** @file StateManager.h
* @author Andreas Garmannslund
@@ -20,8 +22,8 @@
* @param input Pointer to the InputManager which is controlling user input.
* @param firstState The initial state of the finite state machine.
*/
- StateManager(N5110 *lcd, InputManager* input, MainState firstState)
- : lcd(lcd), input(input){currentState = 0; nextState = NO_STATE; changeState(firstState);}
+ StateManager(N5110 *lcd, InputManager* input, Sound *sound, MainState firstState)
+ : lcd(lcd), input(input), sound(sound) {currentState = 0; nextState = NO_STATE; changeState(firstState);}
/// Frees allocated memory
~StateManager() {if (currentState != 0) delete currentState;}
@@ -50,6 +52,7 @@
private:
N5110 *lcd;
InputManager *input;
+ Sound *sound;
State* currentState; // Current state object
MainState nextState; // requested state, NONE if no state is requested
};