Meteor defense project

Dependencies:   N5110 mbed

Revision:
9:4c4d787c7a8b
Parent:
7:3be4369131c6
Child:
10:926b1f89c4f1
--- a/GameEngine/GameEngine.cpp	Tue Mar 28 11:38:13 2017 +0000
+++ b/GameEngine/GameEngine.cpp	Tue Mar 28 20:13:01 2017 +0000
@@ -11,10 +11,10 @@
 }
 
 void GameEngine::drawSpawn(N5110 &lcd){
-    //spawning every 4 second.
-    //moving every 2 second.
+    //spawning every 2 second, moving every 1 seconds at 15 fps & drawit=15. 
+    //It changes depending on the game FPS.
     if (drawit ==0) {
-        drawit =15;
+        drawit =20;
         spa.randomizeSpawn(Array1, Array2);
         spa.moveSpawn(Array1, Array2);
         spa.updateSpawn(Array1,Array2,lcd);
@@ -23,20 +23,20 @@
         spa.updateSpawn(Array1,Array2,lcd);        
     }
 }
-
 void GameEngine::drawLaserPlayer(Gamepad &pad, N5110 &lcd) {
+    weap.laserDamage();
     weap.drawWeapon(pad, lcd);
-        
+    //draw a line for the laser when button is pressed
     if (pad.buttonhold == 1) {
         //printf("hi, button is working \n");
         weap.weaponMath(pad);
-        weap.drawLaser(Array2, lcd);
+        weap.drawLaser(Array1, lcd);
     }
 }
+
 void GameEngine::checkGameRule() {
-    
-    
-    
+    //the only way to lose is when the spawn reaches y = 46.
     
 }
+
     
\ No newline at end of file