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
PeopleEngine.h
00001 #ifndef PEOPLEENGINE_H 00002 #define PEOPLEENGINE_H 00003 00004 #include "mbed.h" 00005 #include "Gamepad.h" 00006 #include "N5110.h" 00007 #include "People.h" 00008 00009 /** PeopleEngine class 00010 @brief set a Engine of 'People' and do some basic check 00011 @author Zeyu Feng 00012 @12 April 2020 00013 */ 00014 00015 class PeopleEngine 00016 { 00017 00018 public: 00019 /**constructor*/ 00020 PeopleEngine(); 00021 00022 /**destructor*/ 00023 ~PeopleEngine(); 00024 00025 /**initialize the position of people*/ 00026 void init(); 00027 00028 /**read the polar input from Joystick*/ 00029 void read_input(Gamepad &pad); 00030 00031 /**update the position of people according to pad input(Joystick)*/ 00032 void update(); 00033 00034 /**draw the basic element of game: box,start circle and destination circle and main object(people) 00035 *@param lcd 00036 *@param flag(int) 00037 */ 00038 void draw(N5110 &lcd,int flag); 00039 /**mutators check whether the collision happens*/ 00040 Vector2D get_pos(); 00041 00042 private: 00043 00044 People _people;//People class 00045 Direction _d; 00046 float _mag; 00047 Vector2D _p; 00048 }; 00049 #endif 00050 00051 00052
Generated on Thu Jul 14 2022 12:45:25 by
