demo
Dependencies: mbed Gamepad N5110
the_wall/the_wall.h@0:ba32cfe0051e, 2020-05-14 (annotated)
- Committer:
- Ting12138
- Date:
- Thu May 14 12:57:32 2020 +0000
- Revision:
- 0:ba32cfe0051e
demo
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Ting12138 | 0:ba32cfe0051e | 1 | #ifndef THE_WALL_H |
Ting12138 | 0:ba32cfe0051e | 2 | #define THE_WALL_H |
Ting12138 | 0:ba32cfe0051e | 3 | |
Ting12138 | 0:ba32cfe0051e | 4 | #include "mbed.h" |
Ting12138 | 0:ba32cfe0051e | 5 | #include "N5110.h" |
Ting12138 | 0:ba32cfe0051e | 6 | #include "Gamepad.h" |
Ting12138 | 0:ba32cfe0051e | 7 | |
Ting12138 | 0:ba32cfe0051e | 8 | |
Ting12138 | 0:ba32cfe0051e | 9 | class the_wall |
Ting12138 | 0:ba32cfe0051e | 10 | { |
Ting12138 | 0:ba32cfe0051e | 11 | |
Ting12138 | 0:ba32cfe0051e | 12 | public: |
Ting12138 | 0:ba32cfe0051e | 13 | the_wall(); |
Ting12138 | 0:ba32cfe0051e | 14 | ~the_wall(); |
Ting12138 | 0:ba32cfe0051e | 15 | |
Ting12138 | 0:ba32cfe0051e | 16 | void init(int x,int gap,int width,int speed); |
Ting12138 | 0:ba32cfe0051e | 17 | void draw1(N5110 &lcd); |
Ting12138 | 0:ba32cfe0051e | 18 | void draw2(N5110 &lcd); |
Ting12138 | 0:ba32cfe0051e | 19 | void update(); |
Ting12138 | 0:ba32cfe0051e | 20 | void reset(); |
Ting12138 | 0:ba32cfe0051e | 21 | int get_x(); |
Ting12138 | 0:ba32cfe0051e | 22 | int get_height(); |
Ting12138 | 0:ba32cfe0051e | 23 | |
Ting12138 | 0:ba32cfe0051e | 24 | private: |
Ting12138 | 0:ba32cfe0051e | 25 | int _height; |
Ting12138 | 0:ba32cfe0051e | 26 | int _width; |
Ting12138 | 0:ba32cfe0051e | 27 | int _x; |
Ting12138 | 0:ba32cfe0051e | 28 | int _y; |
Ting12138 | 0:ba32cfe0051e | 29 | int _speed; |
Ting12138 | 0:ba32cfe0051e | 30 | int _gap; |
Ting12138 | 0:ba32cfe0051e | 31 | }; |
Ting12138 | 0:ba32cfe0051e | 32 | #endif |