Bomberman
Public Member Functions | Public Attributes | List of all members
BBM::KeyboardComponent Class Reference

#include <KeyboardComponent.hpp>

Inheritance diagram for BBM::KeyboardComponent:
Collaboration diagram for BBM::KeyboardComponent:

Public Member Functions

WAL::Componentclone (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...
 
 KeyboardComponent (WAL::Entity &entity, ControllableComponent::Layout controllerLayout=ControllableComponent::Layout::KEYBOARD_0)
 Create a new keyboard component using custom keys. More...
 
 KeyboardComponent (const KeyboardComponent &)=default
 A Keyboard component is copy constructable. More...
 
 ~KeyboardComponent () override=default
 default destructor More...
 
KeyboardComponentoperator= (const KeyboardComponent &)=delete
 A Keyboard component can't be assigned. More...
 
- Public Member Functions inherited from WAL::Component
Componentoperator= (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

Key keySecondary = KEY_SPACE
 jump key More...
 
Key keyBomb = KEY_E
 bomb key More...
 
Key keyPause = KEY_ESCAPE
 pause key More...
 
Key keyRight = KEY_D
 move right key More...
 
Key keyLeft = KEY_A
 move left key More...
 
Key keyUp = KEY_W
 move up key More...
 
Key keyDown = KEY_S
 move down key More...
 
ControllableComponent::Layout layout
 Layout. 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...
 

Constructor & Destructor Documentation

◆ KeyboardComponent() [1/2]

BBM::KeyboardComponent::KeyboardComponent ( WAL::Entity entity,
ControllableComponent::Layout  controllerLayout = ControllableComponent::Layout::KEYBOARD_0 
)
explicit

Create a new keyboard component using custom keys.

◆ KeyboardComponent() [2/2]

BBM::KeyboardComponent::KeyboardComponent ( const KeyboardComponent )
default

A Keyboard component is copy constructable.

◆ ~KeyboardComponent()

BBM::KeyboardComponent::~KeyboardComponent ( )
overridedefault

default destructor

Member Function Documentation

◆ clone()

WAL::Component * BBM::KeyboardComponent::clone ( WAL::Entity entity) const
overridevirtual

Clone a component for another or the same entity.

Parameters
entityThe entity that owns the ne component.

Implements WAL::Component.

◆ onStart()

void BBM::KeyboardComponent::onStart ( )
overridevirtual

The entity or this component has just been enabled.

Reimplemented from WAL::Component.

◆ operator=()

KeyboardComponent& BBM::KeyboardComponent::operator= ( const KeyboardComponent )
delete

A Keyboard component can't be assigned.

Member Data Documentation

◆ keyBomb

Key BBM::KeyboardComponent::keyBomb = KEY_E

bomb key

◆ keyDown

Key BBM::KeyboardComponent::keyDown = KEY_S

move down key

◆ keyLeft

Key BBM::KeyboardComponent::keyLeft = KEY_A

move left key

◆ keyPause

Key BBM::KeyboardComponent::keyPause = KEY_ESCAPE

pause key

◆ keyRight

Key BBM::KeyboardComponent::keyRight = KEY_D

move right key

◆ keySecondary

Key BBM::KeyboardComponent::keySecondary = KEY_SPACE

jump key

◆ keyUp

Key BBM::KeyboardComponent::keyUp = KEY_W

move up key

◆ layout

ControllableComponent::Layout BBM::KeyboardComponent::layout

Layout.


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