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.
Me/Me.h@6:49e77bcc975c, 2020-04-29 (annotated)
- Committer:
- dongyuhu
- Date:
- Wed Apr 29 09:12:18 2020 +0000
- Revision:
- 6:49e77bcc975c
- Parent:
- 2:7d45920b427f
- Child:
- 7:4b92c1ee6231
Using Doxygen documentation
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 | 0:9e95a5ef2659 | 18 | Me(); |
| dongyuhu | 0:9e95a5ef2659 | 19 | ~Me(); |
| dongyuhu | 0:9e95a5ef2659 | 20 | void init(int x,int y,int height,int width); |
| dongyuhu | 0:9e95a5ef2659 | 21 | void draw(N5110 &lcd); |
| dongyuhu | 0:9e95a5ef2659 | 22 | void update(Direction d); |
| dongyuhu | 0:9e95a5ef2659 | 23 | Vector2D get_pos(); |
| dongyuhu | 0:9e95a5ef2659 | 24 | |
| dongyuhu | 0:9e95a5ef2659 | 25 | private: |
| dongyuhu | 0:9e95a5ef2659 | 26 | |
| dongyuhu | 0:9e95a5ef2659 | 27 | int _height; //3 The colltroller is 3 by 3 |
| dongyuhu | 0:9e95a5ef2659 | 28 | int _width; //3 |
| dongyuhu | 0:9e95a5ef2659 | 29 | int _x; |
| dongyuhu | 0:9e95a5ef2659 | 30 | int _y; |
| dongyuhu | 0:9e95a5ef2659 | 31 | int _speed; |
| dongyuhu | 0:9e95a5ef2659 | 32 | |
| dongyuhu | 0:9e95a5ef2659 | 33 | }; |
| dongyuhu | 0:9e95a5ef2659 | 34 | #endif |