Bomberman
BombHolderComponent.hpp
Go to the documentation of this file.
1 //
2 // Created by Tom Augier on 2021-05-20.
3 // Edited by Benjamin Henry on 2021-05-20.
4 // Edited by Louis Auzuret on 2021-05-20.
5 //
6 
7 #pragma once
8 
10 #include "Entity/Entity.hpp"
11 #include <chrono>
12 
13 using namespace std::chrono_literals;
14 
15 namespace BBM
16 {
18  {
19  public:
21  unsigned int bombCount = 1;
23  unsigned int maxBombCount = 3;
25  std::chrono::nanoseconds refillRate = 1s;
27  std::chrono::nanoseconds nextBombRefill = refillRate;
29  unsigned int explosionRadius = 3;
31  int damage = 1;
32 
34  WAL::Component *clone(WAL::Entity &entity) const override;
35 
37  explicit BombHolderComponent(WAL::Entity &entity);
38 
40  BombHolderComponent(WAL::Entity &entity, unsigned int maxBombCount, unsigned int bombExplosionRadius = 3);
41 
43  BombHolderComponent(const BombHolderComponent &) = default;
44 
46  ~BombHolderComponent() override = default;
47 
49  BombHolderComponent &operator=(const BombHolderComponent &) = delete;
50  };
51 }
BBM::BombHolderComponent
Definition: BombHolderComponent.hpp:17
WAL::Component
Represent a single component of WAL.
Definition: Component.hpp:17
BBM
Definition: AnimationsComponent.cpp:9
Entity.hpp
WAL::Entity
An entity of the WAL's ECS.
Definition: Entity.hpp:20
Component.hpp