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
Maintank/MainTank.h@0:8fb740fa6356, 2019-05-11 (annotated)
- Committer:
- el17ph
- Date:
- Sat May 11 14:58:43 2019 +0000
- Revision:
- 0:8fb740fa6356
- Child:
- 1:679d7ada8de7
last
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
el17ph | 0:8fb740fa6356 | 1 | #ifndef __MAIN_TANK__ |
el17ph | 0:8fb740fa6356 | 2 | #define __MAIN_TANK__ |
el17ph | 0:8fb740fa6356 | 3 | |
el17ph | 0:8fb740fa6356 | 4 | #include "mbed.h" |
el17ph | 0:8fb740fa6356 | 5 | #include "N5110.h" |
el17ph | 0:8fb740fa6356 | 6 | #include "Gamepad.h" |
el17ph | 0:8fb740fa6356 | 7 | |
el17ph | 0:8fb740fa6356 | 8 | |
el17ph | 0:8fb740fa6356 | 9 | class MainTank |
el17ph | 0:8fb740fa6356 | 10 | { |
el17ph | 0:8fb740fa6356 | 11 | public: |
el17ph | 0:8fb740fa6356 | 12 | MainTank(); |
el17ph | 0:8fb740fa6356 | 13 | ~MainTank(); |
el17ph | 0:8fb740fa6356 | 14 | void update(Direction d,float mag); |
el17ph | 0:8fb740fa6356 | 15 | void init(); |
el17ph | 0:8fb740fa6356 | 16 | void draw(N5110 &lcd); |
el17ph | 0:8fb740fa6356 | 17 | void add_score(); |
el17ph | 0:8fb740fa6356 | 18 | int get_score(); |
el17ph | 0:8fb740fa6356 | 19 | void lose_life(); |
el17ph | 0:8fb740fa6356 | 20 | int remain_life(); |
el17ph | 0:8fb740fa6356 | 21 | Vector2D get_pos(); |
el17ph | 0:8fb740fa6356 | 22 | private: |
el17ph | 0:8fb740fa6356 | 23 | int m_x; |
el17ph | 0:8fb740fa6356 | 24 | int m_y; |
el17ph | 0:8fb740fa6356 | 25 | int m_speed; |
el17ph | 0:8fb740fa6356 | 26 | int m_score; |
el17ph | 0:8fb740fa6356 | 27 | int m_life; |
el17ph | 0:8fb740fa6356 | 28 | }; |
el17ph | 0:8fb740fa6356 | 29 | |
el17ph | 0:8fb740fa6356 | 30 | |
el17ph | 0:8fb740fa6356 | 31 | #endif |