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

#include <ControllableComponent.hpp>

Inheritance diagram for BBM::ControllableComponent:
Collaboration diagram for BBM::ControllableComponent:

Public Types

enum  Layout {
  NONE, KEYBOARD_0, KEYBOARD_1, GAMEPAD_0,
  GAMEPAD_1, GAMEPAD_2, GAMEPAD_3, AI
}
 

Public Member Functions

void disable ()
 
WAL::Componentclone (WAL::Entity &entity) const override
 Clone a component for another or the same entity. More...
 
 ControllableComponent (WAL::Entity &entity)
 Initialize a new controllable component. More...
 
 ControllableComponent (WAL::Entity &entity, bool isDisabled)
 Initialize a new controllable component. More...
 
 ControllableComponent (const ControllableComponent &)=default
 A Controllable component is copy constructable. More...
 
 ~ControllableComponent () override=default
 default destructor More...
 
ControllableComponentoperator= (const ControllableComponent &)=delete
 A Controllable 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 onStart ()
 The entity or this component has just been enabled. More...
 
virtual void onStop ()
 The entity or this component has just been disable. More...
 

Public Attributes

bool disabled
 True if the entity should not be controllable. More...
 
Vector2f move
 The X and Z abscis of the movement. More...
 
bool secondary = false
 input value for secondary inputs. More...
 
bool bomb = false
 input value for bomb and selection More...
 
bool pause = false
 input value for pause More...
 
Layout layout = NONE
 The layout used for this controllable. More...
 
bool fastClick = false
 True if buttons should be triggered every frame where the key is down, false if the button should only be triggered once the key is released. 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...
 

Member Enumeration Documentation

◆ Layout

Enumerator
NONE 
KEYBOARD_0 
KEYBOARD_1 
GAMEPAD_0 
GAMEPAD_1 
GAMEPAD_2 
GAMEPAD_3 
AI 

Constructor & Destructor Documentation

◆ ControllableComponent() [1/3]

BBM::ControllableComponent::ControllableComponent ( WAL::Entity entity)
explicit

Initialize a new controllable component.

◆ ControllableComponent() [2/3]

BBM::ControllableComponent::ControllableComponent ( WAL::Entity entity,
bool  isDisabled 
)

Initialize a new controllable component.

◆ ControllableComponent() [3/3]

BBM::ControllableComponent::ControllableComponent ( const ControllableComponent )
default

A Controllable component is copy constructable.

◆ ~ControllableComponent()

BBM::ControllableComponent::~ControllableComponent ( )
overridedefault

default destructor

Member Function Documentation

◆ clone()

WAL::Component * BBM::ControllableComponent::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.

◆ disable()

void BBM::ControllableComponent::disable ( )

◆ operator=()

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

A Controllable component can't be assigned.

Member Data Documentation

◆ bomb

bool BBM::ControllableComponent::bomb = false

input value for bomb and selection

◆ disabled

bool BBM::ControllableComponent::disabled

True if the entity should not be controllable.

◆ fastClick

bool BBM::ControllableComponent::fastClick = false

True if buttons should be triggered every frame where the key is down, false if the button should only be triggered once the key is released.

◆ layout

Layout BBM::ControllableComponent::layout = NONE

The layout used for this controllable.

◆ move

Vector2f BBM::ControllableComponent::move

The X and Z abscis of the movement.

◆ pause

bool BBM::ControllableComponent::pause = false

input value for pause

◆ secondary

bool BBM::ControllableComponent::secondary = false

input value for secondary inputs.


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