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.
Diff: GameEngine/GameEngine.h
- Revision:
- 47:49fa1adc10b4
- Parent:
- 45:fc3238cd28c6
- Child:
- 49:ed569eceeaa4
diff -r 142a3914c3e3 -r 49fa1adc10b4 GameEngine/GameEngine.h --- a/GameEngine/GameEngine.h Tue May 19 12:53:39 2020 +0000 +++ b/GameEngine/GameEngine.h Tue May 19 14:57:09 2020 +0000 @@ -13,9 +13,12 @@ #include "People.h" #include "HUD.h" #include "Menu.h" +#include "FXOS8700CQ.h" #include <cmath> #include <vector> + + /** GameEngine class * @brief Runs the different parts of the game * @author Benjamin Evans, University of Leeds @@ -32,9 +35,7 @@ /** Initalises GameEngine */ void init(); - - - /** Switch statement to run run different menu options */ + /** Switch statement to run run different menu options */ void game_select_part(); // Accessors and mutators -------------------------------------------------- @@ -43,7 +44,6 @@ // Function prototypes ----------------------------------------------------- // Menu Control - /** Time-triggered interrupt to wake MCU from sleep */ void lcd_frame_time_isr(); @@ -66,6 +66,9 @@ /** Gets joystick direction from gamepad and stores it in d_ */ void read_joystick_direction(); + /** Gets the pitch and roll of the gamepad and calculates d_ */ + void read_accelerometer_direction(); + /** Turns on specific leds depending on how many lives left */ void spaceship_lives_leds(); @@ -220,7 +223,7 @@ Menu menu; /** Define Ticker object */ - Ticker ticker; + Ticker ticker; }; #endif \ No newline at end of file