Meteor defense project

Dependencies:   N5110 mbed

Revision:
42:152e84494ad9
Parent:
41:1b396334256b
Child:
44:aa086363d09f
diff -r 1b396334256b -r 152e84494ad9 GameEngine/GameEngine.cpp
--- a/GameEngine/GameEngine.cpp	Sun Apr 30 21:53:28 2017 +0000
+++ b/GameEngine/GameEngine.cpp	Sun Apr 30 22:06:22 2017 +0000
@@ -73,9 +73,9 @@
         spa.summon_spawn(main.Arr, main.cArr);
         spa.moveSpawnABC(main.Arr, scnd.Arr, main.cArr, scnd.cArr);
         spa.moveSpawnDE(main.Arr, scnd.Arr, main.cArr, scnd.cArr);
-        //printf("why u do this to cannon_Firing?? cannon_Firing = %d \n",weap.cannon_Firing);
-        if ( fireInTheHole_flag ==1) { //this code because whenever spawn ABCDE moves, weap.cannon_Firing goes to 0 automatically (NO IDEA WHY)
-            weap.cannon_Firing = 1;    
+        //printf("why u do this to cannonFiring_flag?? cannonFiring_flag = %d \n",weap.cannonFiring_flag);
+        if ( fireInTheHole_flag ==1) { //this code because whenever spawn ABCDE moves, weap.cannonFiring_flag goes to 0 automatically (NO IDEA WHY)
+            weap.cannonFiring_flag = 1;    
         }
     } else {
         drawit -= 0.5;
@@ -105,7 +105,7 @@
     if ( fireInTheHole_flag == 1) {
         weap.cannon_main(scnd.Arr, scnd.cArr, lcd);    
     }
-    if ( weap.cannon_Firing == 0) { //clear flag when cannon is done 
+    if ( weap.cannonFiring_flag == 0) { //clear flag when cannon is done 
         fireInTheHole_flag = 0;
     }
 }
@@ -127,13 +127,13 @@
     while (retry_flag == 0 && gameMenu_flag == 0) { //while both are 0
         lcd.clear();
         lcd.printString("Game Over",10,3);
-        lcd.printString("GivUp    Retry",0,5);
+        lcd.printString("GiveUp   Retry",0,5);
         lcd.refresh();   
         pad.leds_on();
         wait(0.1);
         pad.leds_off();
         wait(0.1);
-        printf("press a button pls. you lost retry_flag = %d gameMenu_flag = %d\n",retry_flag,gameMenu_flag);
+        //printf("press a button pls. you lost retry_flag = %d gameMenu_flag = %d\n",retry_flag,gameMenu_flag);
         //must click atleast one button to continue
         if (pad.check_event(Gamepad::START_PRESSED)) {
             retry_flag = 1;