ELEC2645 (2018/19) / Mbed 2 deprecated el17dg

Dependencies:   mbed

Fork of el17dg by Dmitrijs Griskovs

Revision:
25:749f1efc31fc
Parent:
24:0570cb4b92d7
Child:
26:676874c42883
--- a/game/enemies.h	Tue Apr 02 15:38:40 2019 +0000
+++ b/game/enemies.h	Wed Apr 03 12:46:04 2019 +0000
@@ -3,10 +3,11 @@
 
 #include "constants.h"
 #include "geometry.h"
+#include "game.h"
 
-const int max_enemies = 1;
-const int enemy_speed = 1;
-const int max_enemy_blasts = max_enemies * 5;
+const int max_enemies = 2;
+int enemy_speed = 1;
+const int max_enemy_blasts = max_enemies*5;
 const int enemy_blast_speed = 5;
 
     
@@ -46,6 +47,7 @@
             updateAndDrawDeathExplosion();
         }
         if (pos.x < 0) {
+            game_score -= 50; 
             active = false;
         }
     }
@@ -157,8 +159,7 @@
                 lcd.setPixel(enemy_blasts[i].pos.x-2, enemy_blasts[i].pos.y, 1);
             }
         }
-    }
-    
+    }  
 };
 
 #endif
\ No newline at end of file