Target Library
Dependents: GameProject_Prototype
Target.h@11:5b2be6934e1b, 2017-05-02 (annotated)
- Committer:
- ll14c4p
- Date:
- Tue May 02 16:25:54 2017 +0000
- Revision:
- 11:5b2be6934e1b
- Parent:
- 10:45a0af3e607c
- Child:
- 13:828ede9cf8a5
Added set position
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ll14c4p | 10:45a0af3e607c | 1 | #ifndef TARGET_H |
ll14c4p | 10:45a0af3e607c | 2 | #define TARGET_H |
ll14c4p | 10:45a0af3e607c | 3 | |
ll14c4p | 10:45a0af3e607c | 4 | #include "mbed.h" |
ll14c4p | 10:45a0af3e607c | 5 | #include "N5110.h" |
ll14c4p | 10:45a0af3e607c | 6 | #include "Gamepad.h" |
ll14c4p | 10:45a0af3e607c | 7 | |
ll14c4p | 10:45a0af3e607c | 8 | |
ll14c4p | 10:45a0af3e607c | 9 | class Target |
ll14c4p | 10:45a0af3e607c | 10 | { |
ll14c4p | 10:45a0af3e607c | 11 | public: |
ll14c4p | 10:45a0af3e607c | 12 | Target(); |
ll14c4p | 10:45a0af3e607c | 13 | ~Target(); |
ll14c4p | 10:45a0af3e607c | 14 | void init(); |
ll14c4p | 10:45a0af3e607c | 15 | void draw(N5110 &lcd); |
ll14c4p | 10:45a0af3e607c | 16 | void update(); |
ll14c4p | 10:45a0af3e607c | 17 | Vector2D get_pos(); |
ll14c4p | 10:45a0af3e607c | 18 | void set_velocity(Vector2D v); |
ll14c4p | 10:45a0af3e607c | 19 | Vector2D get_velocity(); |
ll14c4p | 11:5b2be6934e1b | 20 | void set_pos(Vector2D p); |
ll14c4p | 10:45a0af3e607c | 21 | |
ll14c4p | 10:45a0af3e607c | 22 | private: |
ll14c4p | 10:45a0af3e607c | 23 | int n; |
ll14c4p | 10:45a0af3e607c | 24 | int _x; |
ll14c4p | 10:45a0af3e607c | 25 | int _y; |
ll14c4p | 10:45a0af3e607c | 26 | Vector2D _velocity; |
ll14c4p | 10:45a0af3e607c | 27 | |
ll14c4p | 10:45a0af3e607c | 28 | }; |
ll14c4p | 10:45a0af3e607c | 29 | #endif |