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.
Explosion/Explosion.h
- Committer:
- evanso
- Date:
- 2020-05-25
- Revision:
- 82:3211b31e9421
- Parent:
- 40:71f947254fda
- Child:
- 83:35d1e846eab2
File content as of revision 82:3211b31e9421:
#ifndef EXPLOSION_H #define EXPLOSION_H // Included Headers ------------------------------------------------------------ #include "mbed.h" #include "N5110.h" #include "Gamepad.h" #include "Position.h" /** Animation Struct * @brief Struct to draw explosion animation */ struct Animation{ bool draw_circle_one; /**< Bool to draw circle one */ bool draw_circle_two; /**< Bool to draw circle two */ FillType circle_one; /**< Fill type of circle one */ FillType circle_two; /**< Fill type of circle two */ }; /** Explosion class * @brief Draws explosion animation * @author Benjamin Evans, University of Leeds * @date May 2020 */ class Explosion: private Position { public: /** Constructor */ Explosion(); /** Destructor */ ~Explosion(); /** Initalises explosion * @param destroyed_position @details Vector2D of destoyed xy pos */ void init(Vector2D destroyed_position); /** Draws the explosion * @param lcd @details N5110 object */ void draw_explosion(N5110 &lcd); // Accessors and mutators -------------------------------------------------- /** Gets the explosion radius * @returns explosion_radius_ */ int get_explosion_radius(); private: // Varibles ---------------------------------------------------------------- /** Explosion circle radius */ int explosion_radius_; /** FSM counter for state in FSM */ int fsm_counter_; /** Draw cunter */ int draw_counter; }; #endif