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

A basic color component. More...

#include <ColorComponent.hpp>

Inheritance diagram for BBM::ColorComponent:
Collaboration diagram for BBM::ColorComponent:

Public Member Functions

WAL::Componentclone (WAL::Entity &entity) const override
 Clone a component for another or the same entity. More...
 
 ColorComponent (WAL::Entity &entity, RAY::Color componentColor)
 Create a new ColorComponent at a certain color. More...
 
 ColorComponent (WAL::Entity &entity, unsigned char r, unsigned char g, unsigned char b, unsigned char a)
 Create a new ColorComponent at a certain color. More...
 
 ColorComponent (const ColorComponent &)=default
 A color component is copy constructable. More...
 
 ~ColorComponent () override=default
 A default destructor. More...
 
ColorComponentoperator= (const ColorComponent &)=delete
 A color 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

RAY::Color color
 Get the editable color of this entity. 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...
 

Detailed Description

A basic color component.

Constructor & Destructor Documentation

◆ ColorComponent() [1/3]

BBM::ColorComponent::ColorComponent ( WAL::Entity entity,
RAY::Color  componentColor 
)

Create a new ColorComponent at a certain color.

◆ ColorComponent() [2/3]

BBM::ColorComponent::ColorComponent ( WAL::Entity entity,
unsigned char  r,
unsigned char  g,
unsigned char  b,
unsigned char  a 
)

Create a new ColorComponent at a certain color.

◆ ColorComponent() [3/3]

BBM::ColorComponent::ColorComponent ( const ColorComponent )
default

A color component is copy constructable.

◆ ~ColorComponent()

BBM::ColorComponent::~ColorComponent ( )
overridedefault

A default destructor.

Member Function Documentation

◆ clone()

WAL::Component * BBM::ColorComponent::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=()

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

A color component is not assignable.

Member Data Documentation

◆ color

RAY::Color BBM::ColorComponent::color

Get the editable color of this entity.


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