James Heavey / Mbed 2 deprecated EL17JH

Dependencies:   mbed

Revision:
114:280903dd7e06
Child:
129:b47c28c7eaaf
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Life_Powerup/Life_Powerup.h	Wed May 08 13:08:55 2019 +0000
@@ -0,0 +1,49 @@
+#ifndef LIFE_POWERUP_H
+#define LIFE_POWERUP_H
+
+#include "mbed.h"
+#include "N5110.h"
+#include "Gamepad.h"
+#include "Paddle.h"
+#include "Bitmap.h"
+
+/* Life_Powerup Class
+@author James Heavey, University of Leeds
+@brief Controls the Life_Powerup in the Breakout game
+@date May 2019
+*/
+
+static int powerup_data[] = 
+{
+    0, 0, 0, 1, 1, 1, 0, 0, 0, 
+    0, 1, 1, 0, 0, 0, 1, 1, 0, 
+    0, 1, 0, 1, 0, 1, 0, 1, 0, 
+    1, 0, 1, 1, 1, 1, 1, 0, 1, 
+    1, 0, 1, 1, 1, 1, 1, 0, 1, 
+    1, 0, 0, 1, 1, 1, 0, 0, 1, 
+    0, 1, 0, 0, 1, 0, 0, 1, 0, 
+    0, 1, 1, 0, 0, 0, 1, 1, 0, 
+    0, 0, 0, 1, 1, 1, 0, 0, 0
+};
+
+class Life_Powerup
+{
+
+public:
+    Life_Powerup();
+    ~Life_Powerup();
+    void init();
+    void draw(N5110 &lcd);
+    void update();
+    /// accessors and mutators
+    int get_x();
+    int get_y();
+    void set_posx(int x);
+    void set_posy(int y);
+
+private:
+    int _speed_y;
+    int _x;
+    int _y;
+};
+#endif
\ No newline at end of file