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.
lib/Barrel/Barrel.h
- Committer:
- Kern_EL17KJTF
- Date:
- 2019-05-08
- Revision:
- 19:8400ecdb69e9
- Parent:
- 18:80c47cfe9802
- Child:
- 25:0ba3524ee0b7
File content as of revision 19:8400ecdb69e9:
#ifndef BARREL_H #define BARREL_H #include "mbed.h" #include "N5110.h" #include "Barrel.h" #include "Donkey.h" /** External variables used inside and out of the class. */ extern int barrel_x; extern int barrel_y; extern int barrel_speed; extern int barrel_min; extern int barrel_max; extern float barrel_time; extern int running; /** Barrel Class *@brief This class is for spawning the barrel, it will float down the screen. Collision with the player will cause gameover. *@author Kern Fowler *@version 1.0 *@date May 2019 */ class Barrel { public: /** Barrel Constructor @brief Builds my default Barrel constructor. @details This does not have any setup. */ Barrel(); /** Barrel Destructor @brief Builds my default Barrel dentructor. @details This does not have any setup. */ ~Barrel(); // Mutators /** *@brief Spawns the barrel *@param pad The Gamepad class is used. *@param lcd The N5110 class is used. *@param dky The Donkey class is used. *@details Spawns a barrel at a random x location, then slowly falls down screen. When reaches bottom it restarts. If collision with player leads to gameover. */ void barrel_drop(Gamepad &pad, N5110 &lcd, Donkey &dky); }; #endif