Dauphine  0.1
A platforming/stealth game in a medieval fantasy setting, developed with SDL2.
Public Member Functions | Public Attributes | List of all members
StatePlayer Class Referenceabstract

Parent class for other player states. More...

#include <StatePlayer.h>

Public Member Functions

 StatePlayer (Player *const player_)
 The constructor. More...
 
virtual ~StatePlayer ()
 The destructor.
 
virtual void enter ()=0
 Method called on load. More...
 
virtual void exit ()=0
 Method called on unload. More...
 
virtual void handleInput (const std::array< bool, GameKeys::MAX > keyStates_)=0
 Update method for the state. More...
 

Public Attributes

Playerplayer
 Reference to the player. More...
 

Detailed Description

Parent class for other player states.

Constructor & Destructor Documentation

StatePlayer::StatePlayer ( Player *const  player_)

The constructor.

Parameters
player_: Reference to the player.

Member Function Documentation

virtual void StatePlayer::enter ( )
pure virtual

Method called on load.

Pure virtual function. Called on state enter.

Implemented in PStateAerial, PStateAiming, PStateCrouching, PStateIdle, PStateMoving, and PStateRolling.

virtual void StatePlayer::exit ( )
pure virtual

Method called on unload.

Pure virtual function. Called on state exit.

Implemented in PStateAerial, PStateAiming, PStateCrouching, PStateIdle, PStateMoving, and PStateRolling.

virtual void StatePlayer::handleInput ( const std::array< bool, GameKeys::MAX >  keyStates_)
pure virtual

Update method for the state.

While the Player is on the state, this method runs every update.

Parameters
keyStates_: Boolean array that contains all input data.

Implemented in PStateAerial, PStateAiming, PStateCrouching, PStateIdle, PStateMoving, and PStateRolling.

Member Data Documentation

Player* StatePlayer::player

Reference to the player.


The documentation for this class was generated from the following files: