|
Bomberman
|
#include <GamepadComponent.hpp>
Public Member Functions | |
| WAL::Component * | clone (WAL::Entity &entity) const override |
| Clone a component for another or the same entity. More... | |
| void | onStart () override |
| The entity or this component has just been enabled. More... | |
| GamepadComponent (WAL::Entity &entity) | |
| Create a new gampad component using default keys. More... | |
| GamepadComponent (WAL::Entity &entity, int id) | |
| Create a new PositionComponent at a certain position. More... | |
| GamepadComponent (const GamepadComponent &)=default | |
| A Gamepad component is copy constructable. More... | |
| ~GamepadComponent () override=default | |
| default destructor More... | |
| GamepadComponent & | operator= (const GamepadComponent &)=delete |
| A Gamepad component can't be assigned. More... | |
| GamepadComponent & | setID (int ID) |
| Set the ID of the Gamepad the events must be fetch from;. More... | |
| int | getID () const |
| Get the ID of the Gamepad the events must be fetch from;. More... | |
Public Member Functions inherited from WAL::Component | |
| Component & | operator= (const Component &)=delete |
| A component can't be assigned. More... | |
| virtual | ~Component ()=default |
| A virtual destructor. More... | |
| virtual void | onStop () |
| The entity or this component has just been disable. More... | |
Public Attributes | |
| Button | keySecondary = GAMEPAD_BUTTON_RIGHT_FACE_RIGHT |
| jump key More... | |
| Button | keyBomb = GAMEPAD_BUTTON_RIGHT_FACE_DOWN |
| bomb key More... | |
| Button | keyPause = GAMEPAD_BUTTON_MIDDLE |
| pause key More... | |
| Button | keyRight = GAMEPAD_BUTTON_LEFT_FACE_RIGHT |
| move right key More... | |
| Button | keyLeft = GAMEPAD_BUTTON_LEFT_FACE_LEFT |
| move left key More... | |
| Button | keyUp = GAMEPAD_BUTTON_LEFT_FACE_UP |
| move up key More... | |
| Button | keyDown = GAMEPAD_BUTTON_LEFT_FACE_DOWN |
| move down key More... | |
| Axis | LeftStickX = GAMEPAD_AXIS_LEFT_X |
| Axis | LeftStickY = GAMEPAD_AXIS_LEFT_Y |
| Axis | RightStickX = GAMEPAD_AXIS_RIGHT_X |
| Axis | RightStickY = GAMEPAD_AXIS_RIGHT_Y |
Private Attributes | |
| int | _ID |
| Identifier of the gamepad, used to fetch events. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from WAL::Component | |
| Component (Entity &entity) | |
| A component can't be instantiated, it should be derived. More... | |
| Component (const Component &)=default | |
| A component can't be instantiated, it should be derived. More... | |
Protected Attributes inherited from WAL::Component | |
| Entity & | _entity |
| The entity that own this component. More... | |
|
explicit |
Create a new gampad component using default keys.
| BBM::GamepadComponent::GamepadComponent | ( | WAL::Entity & | entity, |
| int | id | ||
| ) |
Create a new PositionComponent at a certain position.
|
default |
A Gamepad component is copy constructable.
|
overridedefault |
default destructor
|
overridevirtual |
Clone a component for another or the same entity.
| entity | The entity that owns the ne component. |
Implements WAL::Component.
| int BBM::GamepadComponent::getID | ( | ) | const |
Get the ID of the Gamepad the events must be fetch from;.
|
overridevirtual |
The entity or this component has just been enabled.
Reimplemented from WAL::Component.
|
delete |
A Gamepad component can't be assigned.
| GamepadComponent & BBM::GamepadComponent::setID | ( | int | ID | ) |
Set the ID of the Gamepad the events must be fetch from;.
|
private |
Identifier of the gamepad, used to fetch events.
| Button BBM::GamepadComponent::keyBomb = GAMEPAD_BUTTON_RIGHT_FACE_DOWN |
bomb key
| Button BBM::GamepadComponent::keyDown = GAMEPAD_BUTTON_LEFT_FACE_DOWN |
move down key
| Button BBM::GamepadComponent::keyLeft = GAMEPAD_BUTTON_LEFT_FACE_LEFT |
move left key
| Button BBM::GamepadComponent::keyPause = GAMEPAD_BUTTON_MIDDLE |
pause key
| Button BBM::GamepadComponent::keyRight = GAMEPAD_BUTTON_LEFT_FACE_RIGHT |
move right key
| Button BBM::GamepadComponent::keySecondary = GAMEPAD_BUTTON_RIGHT_FACE_RIGHT |
jump key
| Button BBM::GamepadComponent::keyUp = GAMEPAD_BUTTON_LEFT_FACE_UP |
move up key
| Axis BBM::GamepadComponent::LeftStickX = GAMEPAD_AXIS_LEFT_X |
| Axis BBM::GamepadComponent::LeftStickY = GAMEPAD_AXIS_LEFT_Y |
| Axis BBM::GamepadComponent::RightStickX = GAMEPAD_AXIS_RIGHT_X |
| Axis BBM::GamepadComponent::RightStickY = GAMEPAD_AXIS_RIGHT_Y |
1.8.17