|
GEJM
1.0.0.0
a 2D platformer made by students
|
#include <PlayerController.h>
Public Member Functions | |
| PlayerController (PlayerCreature *creature) | |
| ~PlayerController () | |
| void | jump () |
| void | control () override |
| PlayerController & | operator= (PlayerController const &)=delete |
Public Member Functions inherited from Controller | |
| Controller (Creature *creature, double maxSpeed=1.0) | |
| virtual | ~Controller () |
| Creature * | getCreature () |
| ControllerState | getControllerState () |
Additional Inherited Members | |
Protected Member Functions inherited from Controller | |
| void | goLeft () |
| void | goRight () |
| void | stopGoing () |
| Controller & | operator= (Controller const &)=delete |
Protected Attributes inherited from Controller | |
| Creature * | creature |
| ControllerState | controllerState |
| double const | maxSpeed |
PlayerController is a special Controller that takes interprets player input.
| PlayerController::PlayerController | ( | PlayerCreature * | creature | ) |
The default constructor with PlayerCreature possesion.
| creature | association of Creature object |
| maxSpeed | an absolute value of a maximum horizontal velocity that PlayerController should set |
PlayerController implementation The default constructor with PlayerCreature possesion.
| creature | association of Creature object |
| maxSpeed | an absolute value of a maximum horizontal velocity that PlayerController should set |
| PlayerController::~PlayerController | ( | ) |
The default destructor.
|
overridevirtual |
An implementation of how to control associated PlayerCreature.
Reimplemented from Controller.
| void PlayerController::jump | ( | ) |
Tell controlled PlayerCreature to jump.
|
delete |
Assignment operator is deleted because PlayerController has constant variable.
1.8.11