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: Collision/Collision.h
- Revision:
- 13:eb60628db8bf
- Parent:
- 11:494cc44777fe
- Child:
- 16:cf2bfada3adf
--- a/Collision/Collision.h Mon May 11 14:43:16 2020 +0000
+++ b/Collision/Collision.h Thu May 14 16:45:20 2020 +0000
@@ -16,24 +16,49 @@
class Collision{
public:
- Collision();//constructor
- ~Collision();//destructor
+ /**constructor*/
+ Collision();
+ /**destructor*/
+ ~Collision();
+
+ /**init health and index*/
+ void init();
- //init
- void init();
- //check whether there is a collision
+ /**check whether there is a collision
+ *@return whether collide
+ */
bool check(N5110 &lcd);
- //check whether people reach destination
+
+ /**check whether people reach destination
+ *@return whether reach destination
+ */
bool check_des(N5110 &lcd);
+ /**draw current health at the left top of lcd*/
void draw(N5110 &lcd);
- //get health of people
+
+ /**draw basic elements in collision interface*/
+ void draw_basic(N5110 &lcd);
+
+ /**draw the collision interface to tell gamer health - 1*/
+ void draw_collision(N5110 &lcd);
+
+ /**get health of people
+ *@return health of people
+ */
int get_health();
+ /**get dex_index
+ *@return game informance
+ */
int get_des();
- //accessors
+
+ bool get_check_col();
+ /**accessors*/
void set_pos(Vector2D pos);
+ void set_check_col();
+
private:
int _health;