Ben Evans / Mbed 2 deprecated Defender_Game

Dependencies:   mbed

Revision:
33:7fedd8029473
Parent:
32:c006a9882778
Child:
34:85ccc16f24d2
--- a/GameEngine/GameEngine.h	Thu May 14 20:04:14 2020 +0000
+++ b/GameEngine/GameEngine.h	Thu May 14 22:41:16 2020 +0000
@@ -10,6 +10,7 @@
 #include "Weapons.h"
 #include "Alien.h"
 #include "Explosion.h"
+#include "People.h"
 #include <cmath>
 #include <vector>
  
@@ -68,6 +69,12 @@
         /** Spawns aliens in random position of the screen*/
         void spawn_aliens();
         
+        /** Spawns people in random position at bottom of the screen*/
+        void create_people();
+        
+        /** Draws each people object */
+        void draw_people();
+        
     // Variables ---------------------------------------------------------------
         
         /** Define direction d of joystick*/
@@ -86,10 +93,10 @@
         int smart_bomb_counter;
         
         /** Counter for spawning aliens*/
-        double spawn_alien_counter;
+        double spawn_alien_rate;
         
         /** Counter for spawning aliens*/
-        int spawn_alien_counter_two;
+        int spawn_alien_counter;
         
     // Vectors -----------------------------------------------------------------  
         
@@ -105,6 +112,9 @@
         /** Vector to store each new eplosion object*/
         std::vector<Explosion> explosion_vector;
         
+        /** Vector to store each new people object*/
+        std::vector<People> people_vector;
+        
     // Objects -----------------------------------------------------------------
         
         /** Define Gamepad object*/ 
@@ -118,6 +128,9 @@
         
         /** Define Map object*/
         Map map; 
+        
+        /** Define Weapons object*/
+        Weapons weapons;
 };
  
 #endif
\ No newline at end of file