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
Collision Class Reference
#include <Collision.h>
Public Member Functions | |
| Collision () | |
| constructor | |
| ~Collision () | |
| destructor | |
| void | init () |
| init private variables | |
| void | reset_check_col () |
| reset col_index to 0 | |
| bool | check (N5110 &lcd) |
| check whether there is a collision | |
| bool | check_des (N5110 &lcd) |
| check whether people reach destination | |
| void | draw (N5110 &lcd) |
| draw current health at the left top of lcd | |
| void | draw_basic (N5110 &lcd) |
| draw basic elements in collision interface | |
| void | draw_collision (N5110 &lcd) |
| draw the collision interface to tell gamer health - 1 | |
| int | get_health () |
| accessors get health of people | |
| int | get_des () |
| accessors get des_index | |
| bool | get_check_col () |
| accessors get col_index | |
| void | set_pos (Vector2D pos) |
| accessors | |
Detailed Description
Collision class.
check whether people is shotted
Definition at line 16 of file Collision.h.
Constructor & Destructor Documentation
| Collision | ( | ) |
constructor
Definition at line 13 of file Collision.cpp.
| ~Collision | ( | ) |
destructor
Definition at line 18 of file Collision.cpp.
Member Function Documentation
| bool check | ( | N5110 & | lcd ) |
check whether there is a collision
- Returns:
- whether collide
Definition at line 35 of file Collision.cpp.
| bool check_des | ( | N5110 & | lcd ) |
check whether people reach destination
- Returns:
- whether reach destination
Definition at line 61 of file Collision.cpp.
| void draw | ( | N5110 & | lcd ) |
draw current health at the left top of lcd
Definition at line 76 of file Collision.cpp.
| void draw_basic | ( | N5110 & | lcd ) |
draw basic elements in collision interface
Definition at line 82 of file Collision.cpp.
| void draw_collision | ( | N5110 & | lcd ) |
draw the collision interface to tell gamer health - 1
Definition at line 92 of file Collision.cpp.
| bool get_check_col | ( | ) |
| int get_des | ( | ) |
| int get_health | ( | ) |
accessors get health of people
- Returns:
- health of people
Definition at line 109 of file Collision.cpp.
| void init | ( | ) |
init private variables
Definition at line 23 of file Collision.cpp.
| void reset_check_col | ( | ) |
reset col_index to 0
Definition at line 30 of file Collision.cpp.
| void set_pos | ( | Vector2D | pos ) |
accessors
Definition at line 124 of file Collision.cpp.
Generated on Thu Jul 14 2022 12:45:25 by
1.7.2