|
Bomberman
|
Entity representing a gamepad controller. More...
#include <Gamepad.hpp>
Public Types | |
| typedef ::GamepadButton | Button |
| typedef ::GamepadAxis | Axis |
Public Member Functions | |
| GamePad (int id) | |
| A default constructor. More... | |
| ~GamePad ()=default | |
| A default destructor. More... | |
| GamePad (const GamePad &)=default | |
| A default copy constructor. More... | |
| GamePad & | operator= (const GamePad &)=default |
| An entity is assignable. More... | |
| bool | isPressed (Button) |
| Returns true if Button is pressed on the gamepad. More... | |
| bool | isDown (Button) |
| Returns true if Button is down on the gamepad. More... | |
| bool | isReleased (Button) |
| Returns true if Button is released on the gamepad. More... | |
| float | getAxisValue (int index) |
| Get the value of an axis. More... | |
| bool | isUp (Button) |
| Returns true if Button is up on the gamepad. More... | |
| bool | isAvailable () |
| Returns true if controller is available. More... | |
| void | setID (int id) |
| Sets gamepad's id. More... | |
Private Attributes | |
| int | _id |
| The id of the controller, used to fetch buttons' states. More... | |
Entity representing a gamepad controller.
| typedef ::GamepadAxis RAY::Controller::GamePad::Axis |
| typedef ::GamepadButton RAY::Controller::GamePad::Button |
| RAY::Controller::GamePad::GamePad | ( | int | id | ) |
A default constructor.
| The | id of the controller |
|
default |
A default destructor.
|
default |
A default copy constructor.
| float RAY::Controller::GamePad::getAxisValue | ( | int | index | ) |
Get the value of an axis.
| bool RAY::Controller::GamePad::isAvailable | ( | ) |
Returns true if controller is available.
| bool RAY::Controller::GamePad::isDown | ( | Button | button | ) |
Returns true if Button is down on the gamepad.
| Button | The keycode of the button |
| bool RAY::Controller::GamePad::isPressed | ( | Button | button | ) |
Returns true if Button is pressed on the gamepad.
| Button | The keycode of the button |
| bool RAY::Controller::GamePad::isReleased | ( | Button | button | ) |
Returns true if Button is released on the gamepad.
| Button | The keycode of the button |
| bool RAY::Controller::GamePad::isUp | ( | Button | button | ) |
Returns true if Button is up on the gamepad.
| Button | The keycode of the button |
An entity is assignable.
| void RAY::Controller::GamePad::setID | ( | int | id | ) |
Sets gamepad's id.
|
private |
The id of the controller, used to fetch buttons' states.
1.8.17