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.
Fork of fy15raf by
Diff: Asteroids/Asteroid.h
- Revision:
- 15:658f1216ee84
- Parent:
- 8:13cef7cb872e
- Child:
- 16:106c27d03402
--- a/Asteroids/Asteroid.h Sun May 06 16:17:41 2018 +0000 +++ b/Asteroids/Asteroid.h Mon May 07 13:29:49 2018 +0000 @@ -6,15 +6,40 @@ #include "Gamepad.h" #include "Rocket.h" +/** Asteroid Class +* @brief class create the Asteroids +* @author Reham Faqehi +* @date May, 2018 */ + + class Asteroid { public: + + /** Constructor */ Asteroid(); + + /** Destructor */ ~Asteroid(); + + /** Initialise the Asteroid position, + * speed and size. + */ void init(float speed); - void draw(N5110 &lcd); + + /** Draw sprite for the Asteroid shape + * @param LCD object (N5110) + */ + void draw(N5110 &lcd); + + /** Update the Asteroid position + */ void update(); + + /** Get the Asteroid position + * @return the current position + */ Vector2D get_pos(); private: