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@18:304700b5d8f8, 2019-04-12 (annotated)
- Committer:
- lewisgw
- Date:
- Fri Apr 12 11:30:25 2019 +0000
- Revision:
- 18:304700b5d8f8
- Parent:
- Spikes/Spikes.h@16:331be5c7ed80
- Child:
- 21:20478f086bc2
Added a large menu artwork and re-named variables and functions to make the code more readable
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
lewisgw | 18:304700b5d8f8 | 1 | /** Fire Class |
lewisgw | 18:304700b5d8f8 | 2 | * @brief Generates a fire ball that will end the game if the skateboarder touches it * @author Lewis Wooltorton |
lewisgw | 16:331be5c7ed80 | 3 | * @date April 2019 |
lewisgw | 16:331be5c7ed80 | 4 | */ |
lewisgw | 16:331be5c7ed80 | 5 | |
lewisgw | 18:304700b5d8f8 | 6 | #ifndef FIRE_H |
lewisgw | 18:304700b5d8f8 | 7 | #define FIRE_H |
lewisgw | 16:331be5c7ed80 | 8 | |
lewisgw | 16:331be5c7ed80 | 9 | #include "mbed.h" |
lewisgw | 16:331be5c7ed80 | 10 | |
lewisgw | 18:304700b5d8f8 | 11 | class Fire { |
lewisgw | 16:331be5c7ed80 | 12 | public: |
lewisgw | 18:304700b5d8f8 | 13 | Fire(); |
lewisgw | 18:304700b5d8f8 | 14 | ~Fire(); |
lewisgw | 16:331be5c7ed80 | 15 | |
lewisgw | 16:331be5c7ed80 | 16 | void init(); |
lewisgw | 18:304700b5d8f8 | 17 | void update_fire(); |
lewisgw | 18:304700b5d8f8 | 18 | int * get_fire_sprite(); |
lewisgw | 18:304700b5d8f8 | 19 | int get_fire_x(); |
lewisgw | 16:331be5c7ed80 | 20 | |
lewisgw | 16:331be5c7ed80 | 21 | private: |
lewisgw | 16:331be5c7ed80 | 22 | int _x; |
lewisgw | 18:304700b5d8f8 | 23 | bool _fire_counter; |
lewisgw | 16:331be5c7ed80 | 24 | }; |
lewisgw | 16:331be5c7ed80 | 25 | #endif |