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
Fire/Fire.h
- Committer:
- lewisgw
- Date:
- 2019-04-24
- Revision:
- 25:aa145767fda5
- Parent:
- 24:c7df5aa476a9
- Child:
- 28:be77ad6c0bda
File content as of revision 25:aa145767fda5:
#ifndef FIRE_H #define FIRE_H #include "mbed.h" /** Fire Class * @brief Generates a fire ball that will end the game if the skateboarder touches it * @author Lewis Wooltorton * @date April 2019 */ class Fire { public: /** Constructor, non user specified.*/ Fire(); /** Destructor, non user specified.*/ ~Fire(); // Mutators. /** Initialises Fire object. */ void init(); // Accessors /** Gets the sprite. * @returns The Fire sprite (an integer array) */ int * get_fire_sprite(); /** Gets the x coordinate. * @returns The x coordinate of the Fire */ int get_fire_x(); // Member methods. /** Generates Fire parameters @details Increments Fire x coordinate and toggles fire sprite.*/ void generate_fire(); private: int _x; bool _fire_counter; }; #endif