PlayerInput
Inherited: None
Description
Note: A PlayerInput controller simplifies the management of the player control scheme. It can be used to get the current state of actions from the assigned ControlScheme.
Public Methods
float |
axis (const std::string & name) |
bool |
button (const std::string & name) |
int |
controlScheme () const |
Static Methods
None
Methods Description
float PlayerInput::axis (std::string & name)
Returns the value of the virtual axis identified by name. The value will be in the range -1…1 for keyboard and joystick input devices.
bool PlayerInput::button (std::string & name)
Returns true in case of virtual button identified by name is pressed; otherwise returns false.
int PlayerInput::controlScheme () const
Returns the current assigned control scheme.