Ben Evans University Second Year Project. Game Called Defender.
Embed:
(wiki syntax)
Show/hide line numbers
HUD.h
00001 #ifndef HUD_H 00002 #define HUD_H 00003 00004 // Included Headers ------------------------------------------------------------ 00005 #include "mbed.h" 00006 #include "N5110.h" 00007 00008 /** HUD class 00009 * @brief Draws the HUD(Heads Up Display) on the lcd 00010 * @author Benjamin Evans, University of Leeds 00011 * @date May 2020 00012 */ 00013 class HUD { 00014 public: 00015 /** Constructor */ 00016 HUD(); 00017 00018 /** Destructor */ 00019 ~HUD(); 00020 00021 /** Draws the HUD 00022 * @param lcd @details N5110 object 00023 * @param spaceship_lives @details number of lives of spaceship 00024 * @param points @details number of points you have 00025 * @param smart_bomb_counter @details number of smart bombs left 00026 */ 00027 void draw_HUD(N5110 &lcd,int spaceship_lives, int points, 00028 int smart_bomb_counter); 00029 00030 private: 00031 // Function prototypes ----------------------------------------------------- 00032 00033 /** Draws the lives sprites depending on number of lives left 00034 * @param lcd @details N5110 object 00035 * @param spaceship_lives @details number of lives of spaceship 00036 */ 00037 void draw_lives(N5110 &lcd, int spaceship_lives); 00038 00039 /** Draws the smart bomb sprites depending on number of bombs left 00040 * @param lcd @details N5110 object 00041 * @param smart_bomb_counter @details number of smart bombs left 00042 */ 00043 void draw_smart_bombs(N5110 &lcd, int smart_bomb_counter); 00044 00045 00046 00047 }; 00048 00049 #endif
Generated on Fri Aug 5 2022 06:55:07 by
1.7.2