201377806 ZiWei Liu

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Character.h Source File

Character.h

00001 #ifndef CHARACTER_H
00002 #define CHARACTER_H
00003 
00004 #include"mbed.h"
00005 #include "N5110.h"
00006 #include "Gamepad.h"
00007 
00008 /** Character class
00009  * @create the character and control the move of character
00010  * @author ZiWei Liu Alex
00011  * @date May,2020
00012  */
00013 
00014 class Character{
00015     
00016     private:
00017     float charx;
00018     float chary;
00019     
00020     public:
00021     /**Constructor*/
00022     Character();
00023     /**Destructor*/
00024     ~Character();
00025     
00026     /** draw the character
00027      * @param the lcd screen
00028      */
00029     void draw(N5110 &lcd);
00030     
00031     /** control the character to move upwards
00032      * @param the gamepad
00033      */
00034     void move_up(Gamepad &pad);
00035     
00036     /** control the character to move dowwnwards because of gravity*/
00037     void move_down();
00038     
00039     /** set the upper and lower boundry of the character*/
00040     void boundry();
00041     
00042     /** initiate the character's position
00043      * @param the value of the x and y coordinates of the character
00044      */
00045     void charinit(int manx, int many);
00046     
00047     /** get the position of the character */
00048     Vector2D get_char_position();
00049     
00050     
00051 };
00052 
00053 #endif