ELEC2645 (2018/19) / Mbed 2 deprecated el17dg

Dependencies:   mbed

Fork of el17dg by Dmitrijs Griskovs

Revision:
24:0570cb4b92d7
Parent:
23:240bc00ef25b
Child:
25:749f1efc31fc
--- a/game/enemies.h	Sun Mar 31 01:04:59 2019 +0000
+++ b/game/enemies.h	Tue Apr 02 15:38:40 2019 +0000
@@ -10,7 +10,9 @@
 const int enemy_blast_speed = 5;
 
     
-
+/**@brief
+  * This is a class to describe the states of one enemy ship
+  */
 class Enemy : public GameObject {
 public:
 /**@brief
@@ -33,7 +35,9 @@
         dead = true;
         dead_counter = 3;
     }
-    
+/**@brief
+  * This function draws each individual enemy ship on the screen.
+  */    
     void updateAndDraw() {
         pos.x -= enemy_speed;
         if (!dead) {
@@ -45,7 +49,10 @@
             active = false;
         }
     }
-    
+/**@brief
+  * This is an explosion function that draws the enemy ships explosion sprites
+  * when the player's shot hits it/
+  */        
     void updateAndDrawDeathExplosion() {
         if (dead_counter > 0) {
             dead_counter--;
@@ -65,7 +72,11 @@
 };
 
     
-
+/**@brief
+  * This class describes the states and actions of several enemy ships, including
+  * random position generation (y - position) and enemy ship shooting drawing (also describing
+  * intervals between shots).
+  */  
 class Enemies {
 public: