201377806 ZiWei Liu

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Character Class Reference

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.

Author:
ZiWei Liu Alex
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:
thevalue of the x and y coordinates of the character

Definition at line 8 of file Character.cpp.

void draw ( N5110 lcd )

draw the character

Parameters:
thelcd screen

Definition at line 14 of file Character.cpp.

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:
thegamepad

Definition at line 33 of file Character.cpp.