Meteor defense project

Dependencies:   N5110 mbed

Revision:
13:38cbce17d7d7
Parent:
11:1c48fe71045c
Child:
14:064b8d7f348d
--- a/GameEngine/GameEngine.cpp	Wed Mar 29 22:36:41 2017 +0000
+++ b/GameEngine/GameEngine.cpp	Thu Mar 30 11:13:20 2017 +0000
@@ -14,15 +14,15 @@
     //spawning every 2 second, moving every 1 seconds at 15 fps & drawit=15. 
     //It changes depending on the game FPS.
     if (drawit ==0) {
-        drawit =20;
-        spa.randomizeSpawn(Array1, Array2);
-        spa.moveSpawn(Array1, Array2);
-        spa.updateSpawn(Array1,Array2,lcd);
-        checkGameRule(lcd);
+        drawit =30;
+        spa.randomizeSpawn(Array2, charArray);
+        spa.moveSpawnABC(Array1, Array2, charArray);
     } else {
         drawit -=0.5;
-        spa.updateSpawn(Array1,Array2,lcd);        
+        spa.moveSpawnB(Array1, Array2, charArray);
     }
+    spa.updateSpawn(Array1, Array2, charArray, lcd); 
+    checkGameRule(lcd);
 }
 void GameEngine::drawLaserPlayer(Gamepad &pad, N5110 &lcd) {
     weap.laserDamage();
@@ -49,16 +49,6 @@
     }       
 }
 void GameEngine::bomb(Gamepad &pad, N5110 &lcd) { //cooldown not yet implemented.
-    
-    //press L button to toggle flag
-    if (pad.check_event(Gamepad::L_PRESSED)) {
-        if (bombTarget == 1) {
-            bombTarget = 0;
-        } else if(bombTarget == 0) {
-            bombTarget = 1;
-        }
-    }
-    if (bombTarget == 1) {
-        weap.drawBombTarget(Array1, pad, lcd);
-    }
+    weap.bombCooldown(Array1, pad, lcd);
+
 }
\ No newline at end of file