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.
Dependencies: mbed
Diff: Rocket/Rocket.h
- Revision:
- 15:658f1216ee84
- Parent:
- 12:4d7f1349d796
--- a/Rocket/Rocket.h Sun May 06 16:17:41 2018 +0000
+++ b/Rocket/Rocket.h Mon May 07 13:29:49 2018 +0000
@@ -5,20 +5,65 @@
#include "N5110.h"
#include "Gamepad.h"
+/** Rocket Class
+* @brief class create the rocket
+* @author Reham Faqehi
+* @date May, 2018 */
+
class Rocket
{
public:
+ /** Constructor */
Rocket();
+
+ /** Destructor */
~Rocket();
+
+ /** Initialise the rocket position,
+ * speed and number of collisions.
+ */
void init();
+
+ /** Draw sprite for the Rocket shape
+ * @param LCD object (N5110)
+ */
void draw(N5110 &lcd);
+
+ /** Update the rocket movements
+ * @param Direction d and magnitude (float)
+ */
void update(Direction d,float mag);
+
+ /** Get the rocket position
+ * @return the current position
+ */
Vector2D get_pos();
+
+ /** Increase the number of
+ * collisions
+ */
void add_collisions();
+
+ /** Get the number of
+ * collisions
+ * @return the current collision number
+ */
int get_collisions();
+
+ /** Draw sprite for 3 hearts
+ * @param LCD object (N5110)
+ */
void drawFullHearts(N5110 &lcd);
+
+ /** Draw sprite for 2 hearts only
+ * @param LCD object (N5110)
+ */
void drawTwoHearts(N5110 &lcd);
+
+ /** Draw sprite for 1 heart only
+ * @param LCD object (N5110)
+ */
void drawOneHeart(N5110 &lcd);
private: