Projectile Library
Diff: Projectile.h
- Revision:
- 11:aa2ca5b358fe
- Parent:
- 10:ee3c4bb4ce37
--- a/Projectile.h Thu May 04 09:54:02 2017 +0000 +++ b/Projectile.h Thu May 04 11:36:22 2017 +0000 @@ -11,14 +11,39 @@ public: Projectile(); ~Projectile(); + + /** Initialise Projectile + * + * This function initialises the projectile library. + */ void init(int playerx, int playery); + + /** Draw + * + * This function draws the projectile on screen when called. + */ void draw(N5110 &lcd); + + /** Get Position + * + * This function obtains the coordinates of the top-left pixel in the projectile. + */ Vector2D get_pos(); + + /** Update + * + * This function updates changes in position of the projectile on screen. + */ void update(); int playerx; int playery; int _playerx; int _playery; + + /** Set Position + * + * This function is used to set the position of the projectile to a specific coordinate on screen. + */ void set_pos(Vector2D p); private: