Hu Dongyu
/
HuDongyu
publish my project
Me/Me.h@7:4b92c1ee6231, 2020-04-29 (annotated)
- Committer:
- dongyuhu
- Date:
- Wed Apr 29 10:51:02 2020 +0000
- Revision:
- 7:4b92c1ee6231
- Parent:
- 6:49e77bcc975c
publish
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
dongyuhu | 0:9e95a5ef2659 | 1 | #ifndef ME_H |
dongyuhu | 0:9e95a5ef2659 | 2 | #define ME_H |
dongyuhu | 0:9e95a5ef2659 | 3 | |
dongyuhu | 0:9e95a5ef2659 | 4 | |
dongyuhu | 0:9e95a5ef2659 | 5 | #include "mbed.h" |
dongyuhu | 0:9e95a5ef2659 | 6 | #include "N5110.h" |
dongyuhu | 0:9e95a5ef2659 | 7 | #include "Gamepad.h" |
dongyuhu | 2:7d45920b427f | 8 | //head file referenced from ball.h in Pong Example |
dongyuhu | 6:49e77bcc975c | 9 | /** Me Class |
dongyuhu | 6:49e77bcc975c | 10 | * @brief Me |
dongyuhu | 6:49e77bcc975c | 11 | * @author dongyuhu |
dongyuhu | 6:49e77bcc975c | 12 | * @date April, 2020 |
dongyuhu | 6:49e77bcc975c | 13 | */ |
dongyuhu | 0:9e95a5ef2659 | 14 | class Me |
dongyuhu | 0:9e95a5ef2659 | 15 | { |
dongyuhu | 0:9e95a5ef2659 | 16 | public: |
dongyuhu | 0:9e95a5ef2659 | 17 | |
dongyuhu | 7:4b92c1ee6231 | 18 | /** Constructor */ |
dongyuhu | 0:9e95a5ef2659 | 19 | Me(); |
dongyuhu | 7:4b92c1ee6231 | 20 | /** Destructor */ |
dongyuhu | 0:9e95a5ef2659 | 21 | ~Me(); |
dongyuhu | 7:4b92c1ee6231 | 22 | /** Initialization */ |
dongyuhu | 0:9e95a5ef2659 | 23 | void init(int x,int y,int height,int width); |
dongyuhu | 7:4b92c1ee6231 | 24 | /** draw pattern on lcd*/ |
dongyuhu | 0:9e95a5ef2659 | 25 | void draw(N5110 &lcd); |
dongyuhu | 7:4b92c1ee6231 | 26 | /** Update the values */ |
dongyuhu | 0:9e95a5ef2659 | 27 | void update(Direction d); |
dongyuhu | 7:4b92c1ee6231 | 28 | /** Get the position */ |
dongyuhu | 0:9e95a5ef2659 | 29 | Vector2D get_pos(); |
dongyuhu | 0:9e95a5ef2659 | 30 | |
dongyuhu | 0:9e95a5ef2659 | 31 | private: |
dongyuhu | 0:9e95a5ef2659 | 32 | |
dongyuhu | 0:9e95a5ef2659 | 33 | int _height; //3 The colltroller is 3 by 3 |
dongyuhu | 0:9e95a5ef2659 | 34 | int _width; //3 |
dongyuhu | 0:9e95a5ef2659 | 35 | int _x; |
dongyuhu | 0:9e95a5ef2659 | 36 | int _y; |
dongyuhu | 0:9e95a5ef2659 | 37 | int _speed; |
dongyuhu | 0:9e95a5ef2659 | 38 | |
dongyuhu | 0:9e95a5ef2659 | 39 | }; |
dongyuhu | 0:9e95a5ef2659 | 40 | #endif |