Yuheng Huo / Mbed 2 deprecated hyh_copy

Dependencies:   mbed FXOS8700CQ

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers life.h Source File

life.h

00001 
00002 /** My Life Class
00003 * @Note the number of lives and draw the lives icon
00004 * @author Huo Yuheng
00005 * @date May, 2020
00006 */
00007 class
00008 #ifndef LIFE_H
00009 #define LIFE_H
00010 
00011 
00012 #include "Bitmap.h"
00013 #include "N5110.h"
00014 #include "Gamepad.h"
00015 class life{
00016     public:
00017     
00018     void init();
00019     /** decrease the lives */
00020     void update();
00021     /** show the remail lives on the display */
00022     void display(N5110 &lcd);
00023     int liferest();
00024     
00025     private:
00026     /**number of lives*/
00027     int lives;
00028     /** bitmap of lives */
00029     int icon[56];
00030 };
00031 #endif
00032