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

#include <LobbyComponent.hpp>

Inheritance diagram for BBM::LobbyComponent:
Collaboration diagram for BBM::LobbyComponent:

Public Member Functions

Componentclone (WAL::Entity &entity) const override
 Clone a component for another or the same entity. More...
 
 LobbyComponent (WAL::Entity &entity, int playerNumber, WAL::Entity &button, WAL::Entity &tile)
 Create a new lobby component. More...
 
 LobbyComponent (const LobbyComponent &)=default
 A lobby component is copyable. More...
 
 ~LobbyComponent () override=default
 A default destructor. More...
 
LobbyComponentoperator= (const LobbyComponent &)=delete
 A lobby component is not assignable. 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

ControllableComponent::Layout layout = ControllableComponent::NONE
 The layout used for this player. More...
 
int playerID
 The ID of the lobby player (from 0 to 3) More...
 
int color
 The color of the player (as an index) More...
 
bool ready = false
 Is this player ready. More...
 
WAL::EntityreadyButton
 The entity containing the ready display. More...
 
WAL::EntitycoloredTile
 The colored rectangle behind the player. More...
 
std::chrono::time_point< std::chrono::steady_clock > lastInput
 The time of last input that this lobby player has made. 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

◆ LobbyComponent() [1/2]

BBM::LobbyComponent::LobbyComponent ( WAL::Entity entity,
int  playerNumber,
WAL::Entity button,
WAL::Entity tile 
)
explicit

Create a new lobby component.

◆ LobbyComponent() [2/2]

BBM::LobbyComponent::LobbyComponent ( const LobbyComponent )
default

A lobby component is copyable.

◆ ~LobbyComponent()

BBM::LobbyComponent::~LobbyComponent ( )
overridedefault

A default destructor.

Member Function Documentation

◆ clone()

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

◆ operator=()

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

A lobby component is not assignable.

Member Data Documentation

◆ color

int BBM::LobbyComponent::color

The color of the player (as an index)

◆ coloredTile

WAL::Entity& BBM::LobbyComponent::coloredTile

The colored rectangle behind the player.

◆ lastInput

std::chrono::time_point<std::chrono::steady_clock> BBM::LobbyComponent::lastInput

The time of last input that this lobby player has made.

◆ layout

The layout used for this player.

◆ playerID

int BBM::LobbyComponent::playerID

The ID of the lobby player (from 0 to 3)

◆ ready

bool BBM::LobbyComponent::ready = false

Is this player ready.

◆ readyButton

WAL::Entity& BBM::LobbyComponent::readyButton

The entity containing the ready display.


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