Bomberman
StatComponent.hpp
Go to the documentation of this file.
1 //
2 //
3 //
4 
5 #pragma once
6 
8 #include "Models/Callback.hpp"
9 #include "Wal.hpp"
11 
12 namespace BBM
13 {
16  {
17  public:
20 
22  WAL::Component *clone(WAL::Entity &entity) const override;
23 
27  StatComponent(const StatComponent &) = default;
29  ~StatComponent() override = default;
31  StatComponent &operator=(const StatComponent &) = delete;
32  };
33 } // namespace WAL
BBM::StatComponent
A Stat component which contains a text and a callback.
Definition: StatComponent.hpp:15
Callback.hpp
WAL::Component
Represent a single component of WAL.
Definition: Component.hpp:17
BBM
Definition: AnimationsComponent.cpp:9
WAL::Entity
An entity of the WAL's ECS.
Definition: Entity.hpp:20
Component.hpp
WAL::Callback
A callback where you can subscribe to and emit it.
Definition: Callback.hpp:16
BBM::StatComponent::~StatComponent
~StatComponent() override=default
A default destructor.
BBM::StatComponent::StatComponent
StatComponent(WAL::Entity &entity, WAL::Callback< Drawable2DComponent & > callback)
Create a new StatComponent with a callback.
Definition: StatComponent.cpp:10
Wal.hpp
Drawable2DComponent.hpp
BBM::StatComponent::clone
WAL::Component * clone(WAL::Entity &entity) const override
Clone a component for another or the same entity.
Definition: StatComponent.cpp:15
BBM::StatComponent::operator=
StatComponent & operator=(const StatComponent &)=delete
A color component is not assignable.
BBM::StatComponent::updater
WAL::Callback< Drawable2DComponent & > updater
onEvent callback
Definition: StatComponent.hpp:19