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.
GameEngine/GameEngine.h
- Committer:
- evanso
- Date:
- 2020-04-26
- Revision:
- 14:7419c680656f
- Parent:
- 13:12276eed13ac
- Child:
- 15:90b6821bcf64
File content as of revision 14:7419c680656f:
#ifndef GAMEENGINE_H #define GAMEENGINE_H // Include libraries ----------------------------------------------------------- #include "mbed.h" #include "N5110.h" #include "Gamepad.h" #include "Spaceship.h" #include "Map.h" /** GameEngine class @brief Runs the different parts of the game @author Benjamin Evans, University of Leeds @date April 2020 */ class GameEngine { public: /** Constructor */ GameEngine(); /** Destructor */ ~GameEngine(); /** Initalises GameEngine */ void init(); /** Main gameplay loop that runs playable part of game */ void gameplay_loop(); private: // Function prototypes ------------------------------------------------- /** Moves map with spaceship movment */ void map_movement(); // Variables ----------------------------------------------------------- // Changes the drawing x postion of map, 1 moves right, -1 moves left and 0 doesnt change map position int move_map_; void get_joystick_direction(); // Objects ------------------------------------------------------------- // Gamepad object Gamepad pad; // LCD object N5110 lcd; // Direction object of joystick Direction d_; // Spaceship object Spaceship spaceship; // Map object Map map; }; #endif