Projectile Library

Committer:
ll14c4p
Date:
Tue May 02 09:43:19 2017 +0000
Revision:
3:70c599d9f191
Parent:
2:b079859c59ba
Child:
4:977109f7b9f6
Actually spawns now, just need to make it spawn on player sprite location.

Who changed what in which revision?

UserRevisionLine numberNew 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 3:70c599d9f191 14 void init();
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 update();
ll14c4p 2:b079859c59ba 20 int playerx;
ll14c4p 2:b079859c59ba 21 int playery;
ll14c4p 0:6914458c54cd 22
ll14c4p 0:6914458c54cd 23 private:
ll14c4p 3:70c599d9f191 24 int m;
ll14c4p 1:2aee0cb1ebf9 25 Vector2D _velocity;
ll14c4p 1:2aee0cb1ebf9 26 int _size;
ll14c4p 1:2aee0cb1ebf9 27 int _x;
ll14c4p 1:2aee0cb1ebf9 28 int _y;
ll14c4p 2:b079859c59ba 29
ll14c4p 0:6914458c54cd 30 };
ll14c4p 0:6914458c54cd 31 #endif