Yuheng Huo
/
hyh_copy_copy
test
life/life.h@4:c7dc43515215, 2020-05-15 (annotated)
- Committer:
- Neowless
- Date:
- Fri May 15 20:36:00 2020 +0000
- Revision:
- 4:c7dc43515215
- Parent:
- 3:31ff7b3e2005
test;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Neowless | 3:31ff7b3e2005 | 1 | |
Neowless | 3:31ff7b3e2005 | 2 | /** My Life Class |
Neowless | 3:31ff7b3e2005 | 3 | * @Note the number of lives and draw the lives icon |
Neowless | 3:31ff7b3e2005 | 4 | * @author Huo Yuheng |
Neowless | 3:31ff7b3e2005 | 5 | * @date May, 2020 |
Neowless | 3:31ff7b3e2005 | 6 | */ |
Neowless | 3:31ff7b3e2005 | 7 | class |
Neowless | 3:31ff7b3e2005 | 8 | #ifndef LIFE_H |
Neowless | 3:31ff7b3e2005 | 9 | #define LIFE_H |
Neowless | 3:31ff7b3e2005 | 10 | |
Neowless | 3:31ff7b3e2005 | 11 | |
Neowless | 3:31ff7b3e2005 | 12 | #include "Bitmap.h" |
Neowless | 3:31ff7b3e2005 | 13 | #include "N5110.h" |
Neowless | 3:31ff7b3e2005 | 14 | #include "Gamepad.h" |
Neowless | 3:31ff7b3e2005 | 15 | class life{ |
Neowless | 3:31ff7b3e2005 | 16 | public: |
Neowless | 3:31ff7b3e2005 | 17 | |
Neowless | 3:31ff7b3e2005 | 18 | void init(); |
Neowless | 3:31ff7b3e2005 | 19 | /** decrease the lives */ |
Neowless | 3:31ff7b3e2005 | 20 | void update(); |
Neowless | 3:31ff7b3e2005 | 21 | /** show the remail lives on the display */ |
Neowless | 3:31ff7b3e2005 | 22 | void display(N5110 &lcd); |
Neowless | 3:31ff7b3e2005 | 23 | int liferest(); |
Neowless | 3:31ff7b3e2005 | 24 | |
Neowless | 3:31ff7b3e2005 | 25 | private: |
Neowless | 3:31ff7b3e2005 | 26 | /**number of lives*/ |
Neowless | 3:31ff7b3e2005 | 27 | int lives; |
Neowless | 3:31ff7b3e2005 | 28 | /** bitmap of lives */ |
Neowless | 3:31ff7b3e2005 | 29 | int icon[56]; |
Neowless | 3:31ff7b3e2005 | 30 | }; |
Neowless | 3:31ff7b3e2005 | 31 | #endif |
Neowless | 3:31ff7b3e2005 | 32 |