Meteor defense project

Dependencies:   N5110 mbed

Revision:
14:064b8d7f348d
Parent:
13:38cbce17d7d7
Child:
15:c68a5c22a2a2
--- a/GameEngine/GameEngine.cpp	Thu Mar 30 11:13:20 2017 +0000
+++ b/GameEngine/GameEngine.cpp	Mon Apr 03 12:48:54 2017 +0000
@@ -22,7 +22,7 @@
         spa.moveSpawnB(Array1, Array2, charArray);
     }
     spa.updateSpawn(Array1, Array2, charArray, lcd); 
-    checkGameRule(lcd);
+    //checkGameRule(lcd);
 }
 void GameEngine::drawLaserPlayer(Gamepad &pad, N5110 &lcd) {
     weap.laserDamage();
@@ -48,7 +48,12 @@
         }
     }       
 }
-void GameEngine::bomb(Gamepad &pad, N5110 &lcd) { //cooldown not yet implemented.
+void GameEngine::bombAndShield(Gamepad &pad, N5110 &lcd) { //cooldown not yet implemented.
     weap.bombCooldown(Array1, pad, lcd);
-
+    if (pad.check_event(Gamepad::X_PRESSED)) {
+        //to prevent from detonating the bomb at instant when button is accidentally pressed 
+    }
+    if (pad.buttonhold_B == 1) {
+        weap.energyShield(Array1, Array2, charArray, lcd);
+    }
 }
\ No newline at end of file