ELEC2645 (2019/20) / Mbed 2 deprecated ELEC2645_Project_el19zf

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

PeopleEngine Class Reference

PeopleEngine Class Reference

PeopleEngine class. More...

#include <PeopleEngine.h>

Public Member Functions

 PeopleEngine ()
 constructor
 ~PeopleEngine ()
 destructor
void init ()
 initialize the position of people
void read_input (Gamepad &pad)
 read the polar input from Joystick
void update ()
 update the position of people according to pad input(Joystick)
void draw (N5110 &lcd, int flag)
 draw the basic element of game: box,start circle and destination circle and main object(people)
Vector2D get_pos ()
 mutators check whether the collision happens

Detailed Description

PeopleEngine class.

set a Engine of 'People' and do some basic check

Author:
Zeyu Feng @12 April 2020

Definition at line 15 of file PeopleEngine.h.


Constructor & Destructor Documentation

PeopleEngine (  )

constructor

Definition at line 3 of file PeopleEngine.cpp.

~PeopleEngine (  )

destructor

Definition at line 8 of file PeopleEngine.cpp.


Member Function Documentation

void draw ( N5110 lcd,
int  flag 
)

draw the basic element of game: box,start circle and destination circle and main object(people)

Parameters:
lcd
flag(int)

Definition at line 32 of file PeopleEngine.cpp.

Vector2D get_pos (  )

mutators check whether the collision happens

Definition at line 41 of file PeopleEngine.cpp.

void init (  )

initialize the position of people

Definition at line 13 of file PeopleEngine.cpp.

void read_input ( Gamepad pad )

read the polar input from Joystick

Definition at line 17 of file PeopleEngine.cpp.

void update (  )

update the position of people according to pad input(Joystick)

Definition at line 24 of file PeopleEngine.cpp.