Matis Requis 201241242

Dependencies:   mbed

Tempest Game

Game Screen

https://os.mbed.com/media/uploads/MatisRequis/tempest_board_wiki.png The board is made of 12 columns. The Hero stays at the top of the column

Game Controls

https://os.mbed.com/media/uploads/MatisRequis/gamepad_buttons.png

To control the hero spaceship point the joystick to the column you want the hero to go to.

Press the A button to shoot a bullet in the column you are currently in.

Revision:
6:037dfa5064a1
Parent:
5:a3c9a5837a7c
Child:
10:2ae9d4145410
--- a/Hero/Hero.cpp	Fri May 22 10:37:26 2020 +0000
+++ b/Hero/Hero.cpp	Mon May 25 07:46:48 2020 +0000
@@ -46,11 +46,11 @@
 }
 
 
-void Hero::update(float d, float mag, int a) {
+void Hero::update(float d, float mag) {
 
     _d = d;
     _mag = mag;
-
+    
     if (_d < 0) {
     }   else if (_d <= 15) {
         _column = 1;
@@ -80,9 +80,7 @@
         _column = 1;
     }
     
-    if (a == 1) {
-        shoot = 1;    
-    }
+    
 }
 
 
@@ -127,4 +125,8 @@
         Vector2D p = {0,0};
         return p;
     } 
+}
+
+int Hero::get_column() {
+    return _column;   
 }
\ No newline at end of file