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

#include <BombHolderComponent.hpp>

Inheritance diagram for BBM::BombHolderComponent:
Collaboration diagram for BBM::BombHolderComponent:

Public Member Functions

WAL::Componentclone (WAL::Entity &entity) const override
 Clone a component for another or the same entity. More...
 
 BombHolderComponent (WAL::Entity &entity)
 A component can't be instantiated, it should be derived. More...
 
 BombHolderComponent (WAL::Entity &entity, unsigned int maxBombCount, unsigned int bombExplosionRadius=3)
 Constructor. More...
 
 BombHolderComponent (const BombHolderComponent &)=default
 A component can't be instantiated, it should be derived. More...
 
 ~BombHolderComponent () override=default
 default destructor More...
 
BombHolderComponentoperator= (const BombHolderComponent &)=delete
 A 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

unsigned int bombCount = 1
 The number of bomb that this entity hold. More...
 
unsigned int maxBombCount = 3
 The max number of bomb that this entity can have. More...
 
std::chrono::nanoseconds refillRate = 1s
 The number of seconds of each refill. This variable is used to reset the nextBombRefill value. More...
 
std::chrono::nanoseconds nextBombRefill = refillRate
 The number of nanosecond before the next bomb refill. More...
 
unsigned int explosionRadius = 3
 The radius of the explosion. More...
 
int damage = 1
 The damage made by the explosion on an 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...
 

Constructor & Destructor Documentation

◆ BombHolderComponent() [1/3]

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

A component can't be instantiated, it should be derived.

◆ BombHolderComponent() [2/3]

BBM::BombHolderComponent::BombHolderComponent ( WAL::Entity entity,
unsigned int  maxBombCount,
unsigned int  bombExplosionRadius = 3 
)

Constructor.

◆ BombHolderComponent() [3/3]

BBM::BombHolderComponent::BombHolderComponent ( const BombHolderComponent )
default

A component can't be instantiated, it should be derived.

◆ ~BombHolderComponent()

BBM::BombHolderComponent::~BombHolderComponent ( )
overridedefault

default destructor

Member Function Documentation

◆ clone()

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

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

A component can't be assigned.

Member Data Documentation

◆ bombCount

unsigned int BBM::BombHolderComponent::bombCount = 1

The number of bomb that this entity hold.

◆ damage

int BBM::BombHolderComponent::damage = 1

The damage made by the explosion on an entity.

◆ explosionRadius

unsigned int BBM::BombHolderComponent::explosionRadius = 3

The radius of the explosion.

◆ maxBombCount

unsigned int BBM::BombHolderComponent::maxBombCount = 3

The max number of bomb that this entity can have.

◆ nextBombRefill

std::chrono::nanoseconds BBM::BombHolderComponent::nextBombRefill = refillRate

The number of nanosecond before the next bomb refill.

◆ refillRate

std::chrono::nanoseconds BBM::BombHolderComponent::refillRate = 1s

The number of seconds of each refill. This variable is used to reset the nextBombRefill value.


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