Projectile Library
Projectile.h@2:b079859c59ba, 2017-04-29 (annotated)
- Committer:
- ll14c4p
- Date:
- Sat Apr 29 13:17:35 2017 +0000
- Revision:
- 2:b079859c59ba
- Parent:
- 1:2aee0cb1ebf9
- Child:
- 3:70c599d9f191
Origin created
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ll14c4p | 0:6914458c54cd | 1 | #ifndef PROJECTILE_H |
ll14c4p | 0:6914458c54cd | 2 | #define PROJECTILE_H |
ll14c4p | 0:6914458c54cd | 3 | |
ll14c4p | 0:6914458c54cd | 4 | #include "mbed.h" |
ll14c4p | 0:6914458c54cd | 5 | #include "N5110.h" |
ll14c4p | 0:6914458c54cd | 6 | #include "Gamepad.h" |
ll14c4p | 2:b079859c59ba | 7 | #include "Player.h" |
ll14c4p | 0:6914458c54cd | 8 | |
ll14c4p | 0:6914458c54cd | 9 | class Projectile |
ll14c4p | 0:6914458c54cd | 10 | { |
ll14c4p | 0:6914458c54cd | 11 | public: |
ll14c4p | 0:6914458c54cd | 12 | Projectile(); |
ll14c4p | 0:6914458c54cd | 13 | ~Projectile(); |
ll14c4p | 1:2aee0cb1ebf9 | 14 | void init(int size,int speed); |
ll14c4p | 1:2aee0cb1ebf9 | 15 | void draw(N5110 &lcd); |
ll14c4p | 1:2aee0cb1ebf9 | 16 | void set_velocity(Vector2D v); |
ll14c4p | 1:2aee0cb1ebf9 | 17 | Vector2D get_velocity(); |
ll14c4p | 1:2aee0cb1ebf9 | 18 | Vector2D get_pos(); |
ll14c4p | 1:2aee0cb1ebf9 | 19 | void set_pos(Vector2D p); |
ll14c4p | 1:2aee0cb1ebf9 | 20 | void update(); |
ll14c4p | 2:b079859c59ba | 21 | int playerx; |
ll14c4p | 2:b079859c59ba | 22 | int playery; |
ll14c4p | 0:6914458c54cd | 23 | |
ll14c4p | 0:6914458c54cd | 24 | private: |
ll14c4p | 0:6914458c54cd | 25 | |
ll14c4p | 1:2aee0cb1ebf9 | 26 | Vector2D _velocity; |
ll14c4p | 1:2aee0cb1ebf9 | 27 | int _size; |
ll14c4p | 1:2aee0cb1ebf9 | 28 | int _x; |
ll14c4p | 1:2aee0cb1ebf9 | 29 | int _y; |
ll14c4p | 2:b079859c59ba | 30 | |
ll14c4p | 0:6914458c54cd | 31 | }; |
ll14c4p | 0:6914458c54cd | 32 | #endif |