201377806 ZiWei Liu
Character Class Reference
Character class the character and control the move of character. More...
#include <Character.h>
Public Member Functions | |
| Character () | |
| Constructor. | |
| ~Character () | |
| Destructor. | |
| void | draw (N5110 &lcd) |
| draw the character | |
| void | move_up (Gamepad &pad) |
| control the character to move upwards | |
| void | move_down () |
| control the character to move dowwnwards because of gravity | |
| void | boundry () |
| set the upper and lower boundry of the character | |
| void | charinit (int manx, int many) |
| initiate the character's position | |
| Vector2D | get_char_position () |
| get the position of the character | |
Detailed Description
Character class the character and control the move of character.
- Date:
- May,2020
Definition at line 14 of file Character.h.
Constructor & Destructor Documentation
| Character | ( | ) |
Constructor.
Definition at line 4 of file Character.cpp.
| ~Character | ( | ) |
Destructor.
Definition at line 6 of file Character.cpp.
Member Function Documentation
| void boundry | ( | ) |
set the upper and lower boundry of the character
Definition at line 45 of file Character.cpp.
| void charinit | ( | int | manx, |
| int | many | ||
| ) |
initiate the character's position
- Parameters:
-
the value of the x and y coordinates of the character
Definition at line 8 of file Character.cpp.
| void draw | ( | N5110 & | lcd ) |
| Vector2D get_char_position | ( | ) |
get the position of the character
Definition at line 58 of file Character.cpp.
| void move_down | ( | ) |
control the character to move dowwnwards because of gravity
Definition at line 40 of file Character.cpp.
| void move_up | ( | Gamepad & | pad ) |
control the character to move upwards
- Parameters:
-
the gamepad
Definition at line 33 of file Character.cpp.
Generated on Sat Jul 16 2022 00:49:05 by
1.7.2