some non breaking changes fix (std::move + One ctor with opt params instead of multiple ctors)

This commit is contained in:
Clément Le Bihan
2021-06-07 19:21:52 +02:00
parent 5fc43dc15a
commit c16f264920
2 changed files with 4 additions and 18 deletions
+3 -11
View File
@@ -6,22 +6,14 @@
#include "HealthComponent.hpp"
#include <utility>
namespace BBM
{
HealthComponent::HealthComponent(WAL::Entity &entity)
: WAL::Component(entity),
_healthPoint()
{}
HealthComponent::HealthComponent(WAL::Entity &entity, unsigned int healthPoint)
: WAL::Component(entity),
_healthPoint(healthPoint)
{}
HealthComponent::HealthComponent(WAL::Entity &entity, unsigned int healthPoint, std::function<void (WAL::Entity &)> callback)
: WAL::Component(entity),
_healthPoint(healthPoint),
onDeath(callback)
onDeath(std::move(callback))
{}
WAL::Component *HealthComponent::clone(WAL::Entity &entity) const