Bomberman
ScoreComponent.hpp
Go to the documentation of this file.
1 
2 #pragma once
3 
5 #include <chrono>
6 
7 namespace BBM
8 {
11  {
12  public:
14  std::chrono::nanoseconds aliveTime;
15 
17  WAL::Component *clone(WAL::Entity &entity) const override;
18 
20  explicit ScoreComponent(WAL::Entity &entity);
22  ScoreComponent(const ScoreComponent &) = default;
24  ~ScoreComponent() override = default;
26  ScoreComponent &operator=(const ScoreComponent &) = delete;
27  };
28 } // namespace WAL
BBM::ScoreComponent::aliveTime
std::chrono::nanoseconds aliveTime
the score of the player
Definition: ScoreComponent.hpp:14
WAL::Component
Represent a single component of WAL.
Definition: Component.hpp:17
BBM::ScoreComponent::~ScoreComponent
~ScoreComponent() override=default
A default destructor.
BBM
Definition: AnimationsComponent.cpp:9
BBM::ScoreComponent
A basic position component.
Definition: ScoreComponent.hpp:10
WAL::Entity
An entity of the WAL's ECS.
Definition: Entity.hpp:20
Component.hpp
BBM::ScoreComponent::ScoreComponent
ScoreComponent(WAL::Entity &entity)
Create a new ScoreComponent linked to a specific entity.
Definition: ScoreComponent.cpp:6
BBM::ScoreComponent::clone
WAL::Component * clone(WAL::Entity &entity) const override
Clone a component for another or the same entity.
Definition: ScoreComponent.cpp:11
BBM::ScoreComponent::operator=
ScoreComponent & operator=(const ScoreComponent &)=delete
A position component is not assignable.