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.
Attacker/Attacker.h@2:7d45920b427f, 2020-04-27 (annotated)
- Committer:
- dongyuhu
- Date:
- Mon Apr 27 07:01:39 2020 +0000
- Revision:
- 2:7d45920b427f
- Parent:
- 0:9e95a5ef2659
- Child:
- 6:49e77bcc975c
Add some refrence
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| dongyuhu | 0:9e95a5ef2659 | 1 | #ifndef Attacker_H |
| dongyuhu | 0:9e95a5ef2659 | 2 | #define Attacker_H |
| dongyuhu | 0:9e95a5ef2659 | 3 | |
| dongyuhu | 0:9e95a5ef2659 | 4 | #include "mbed.h" |
| dongyuhu | 0:9e95a5ef2659 | 5 | #include "N5110.h" |
| dongyuhu | 0:9e95a5ef2659 | 6 | #include "Gamepad.h" |
| dongyuhu | 0:9e95a5ef2659 | 7 | #include "Me.h" |
| dongyuhu | 2:7d45920b427f | 8 | //head file referenced from paddle.h in Pong Example |
| dongyuhu | 0:9e95a5ef2659 | 9 | class Attacker |
| dongyuhu | 0:9e95a5ef2659 | 10 | { |
| dongyuhu | 0:9e95a5ef2659 | 11 | |
| dongyuhu | 0:9e95a5ef2659 | 12 | public: |
| dongyuhu | 0:9e95a5ef2659 | 13 | Attacker(); |
| dongyuhu | 0:9e95a5ef2659 | 14 | ~Attacker(); |
| dongyuhu | 0:9e95a5ef2659 | 15 | void init1(int size,int speed); |
| dongyuhu | 0:9e95a5ef2659 | 16 | void init2(int size,int speed); |
| dongyuhu | 0:9e95a5ef2659 | 17 | void init3(int size,int speed); |
| dongyuhu | 0:9e95a5ef2659 | 18 | void init4(int size,int speed); |
| dongyuhu | 0:9e95a5ef2659 | 19 | void init5(int size,int speed); |
| dongyuhu | 0:9e95a5ef2659 | 20 | void init6(int size,int speed); |
| dongyuhu | 0:9e95a5ef2659 | 21 | void init7(int size,int speed); |
| dongyuhu | 0:9e95a5ef2659 | 22 | void init8(int size,int speed); |
| dongyuhu | 0:9e95a5ef2659 | 23 | |
| dongyuhu | 0:9e95a5ef2659 | 24 | void draw(N5110 &lcd); |
| dongyuhu | 0:9e95a5ef2659 | 25 | void update(); |
| dongyuhu | 0:9e95a5ef2659 | 26 | Vector2D get_velocity(); |
| dongyuhu | 0:9e95a5ef2659 | 27 | void set_velocity(Vector2D v); |
| dongyuhu | 0:9e95a5ef2659 | 28 | |
| dongyuhu | 0:9e95a5ef2659 | 29 | Vector2D get_pos(); |
| dongyuhu | 0:9e95a5ef2659 | 30 | void set_pos(Vector2D p); |
| dongyuhu | 0:9e95a5ef2659 | 31 | |
| dongyuhu | 0:9e95a5ef2659 | 32 | private: |
| dongyuhu | 0:9e95a5ef2659 | 33 | |
| dongyuhu | 0:9e95a5ef2659 | 34 | Vector2D _velocity; |
| dongyuhu | 0:9e95a5ef2659 | 35 | int _size; |
| dongyuhu | 0:9e95a5ef2659 | 36 | int _x; |
| dongyuhu | 0:9e95a5ef2659 | 37 | int _y; |
| dongyuhu | 0:9e95a5ef2659 | 38 | }; |
| dongyuhu | 0:9e95a5ef2659 | 39 | #endif |