Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Diff: Floors/Floors.h
- Revision:
- 35:b99b563c3eb6
- Parent:
- 31:5c4acae51026
- Child:
- 36:0c852c5ade4b
--- 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: