ELEC2645 (2018/19) / Mbed 2 deprecated el17m2h_public

Dependencies:   mbed

Revision:
35:b99b563c3eb6
Parent:
31:5c4acae51026
Child:
36:0c852c5ade4b
diff -r a9b14a4ccd46 -r b99b563c3eb6 Floors/Floors.h
--- a/Floors/Floors.h	Thu May 09 14:07:09 2019 +0000
+++ b/Floors/Floors.h	Thu May 09 14:17:12 2019 +0000
@@ -50,7 +50,14 @@
     */
     void update(float doodler_pos_x, float doodler_pos_y, float _bullet_pos_x, float _bullet_pos_y);
     
-    
+    /**
+    @brief Function to check if doodler or bullet have collided with the enemy 
+    @param float _bullet_pos_x
+    @param float _bullet_pos_y
+    @details Gets the current values of doodler (already defined as private variables) and the bullet (inputed to the 
+    function) in order to compare it with the position of the enemy. If they collide, the end_game decision variable will
+    indicate if the game should end, or if the bullet hit the enemy, the game will continue but the enemy will be erased. 
+    */
     void check_enemy(float _bullet_pos_x, float _bullet_pos_y);
     
     /**
@@ -67,6 +74,11 @@
     */
     void set_position(Vector2D pos); // mutators
     
+    /**
+    @brief Returns a true/false statement that is called on engine to decide if game should end or not
+    @details The function can be called in the engine to check if the game should end or not (if the doodler has collided
+    with the enemy)
+    */
     bool get_end_game();
 
 private: