Ben Evans / Mbed 2 deprecated Defender_Game

Dependencies:   mbed

Revision:
39:fc5586b930e3
Parent:
36:27aa597db3d2
Child:
40:71f947254fda
--- a/GameEngine/GameEngine.h	Sat May 16 17:19:18 2020 +0000
+++ b/GameEngine/GameEngine.h	Sat May 16 21:08:54 2020 +0000
@@ -11,6 +11,7 @@
 #include "Alien.h"
 #include "Explosion.h"
 #include "People.h"
+#include "HUD.h"
 #include <cmath>
 #include <vector>
  
@@ -37,12 +38,16 @@
           
     private:
     // Function prototypes -----------------------------------------------------
-        
+    
+    //Spaceship Control      
         /** Gets joystick direction from gamepad and stores it in d_ */
         void read_joystick_direction();
         
+        /** Turns on specific leds depending on how many lives left */
+        void spaceship_lives_leds();
+        
     //Weapon Control      
-        /** Creates weapons object if button A is pressed and stores in vector */
+        /** Creates weapons object if button A is pressed and stores in vector*/
         void create_weapons_bullets();
         
         /** Creates smart bomb if button B is pressed */
@@ -105,6 +110,10 @@
         void reset_map();
          
     // Variables ---------------------------------------------------------------
+          
+    //Spacehip Control  
+        /** Define points*/
+        int points; 
         
         /** Define direction d of joystick*/
         Direction d_; 
@@ -115,12 +124,11 @@
         /** Number of spaceship lives remaining*/
         int spaceship_lives;
         
+    // Map Control     
         /** Counter to reset map after set amount of frames*/
         int reset_map_counter;
-        
-        /** Counter for how smart bombs left*/
-        int smart_bomb_counter;
-        
+          
+    // Alien Control     
         /** Counter for spawning aliens*/
         int spawn_alien_counter;
         
@@ -129,6 +137,16 @@
         
         /** Counter for spawning aliens*/
         double spawn_alien_rate;
+    
+    // Weapon Control   
+        /** Counter for smart bomb timer*/
+        int smart_bomb_timer;
+        
+        /** Counter for bullet timer*/
+        int bullet_timer;
+        
+        /** Counter for how smart bombs left*/
+        int smart_bomb_counter;
         
     // Vectors -----------------------------------------------------------------  
         
@@ -163,6 +181,9 @@
         
         /** Define Weapons object*/
         Weapons weapons;
+        
+        /** Define HUD object*/
+        HUD hud;
 };
  
 #endif
\ No newline at end of file