mirror of
https://github.com/zoriya/Bomberman.git
synced 2026-06-02 02:05:25 +00:00
Merging with develop
This commit is contained in:
@@ -6,14 +6,11 @@
|
||||
|
||||
#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::Callback<WAL::Entity &> onDeath)
|
||||
HealthComponent::HealthComponent(WAL::Entity &entity, unsigned int healthPoint, const WAL::Callback<WAL::Entity &> &onDeath)
|
||||
: WAL::Component(entity),
|
||||
_healthPoint(healthPoint),
|
||||
onDeath(onDeath)
|
||||
@@ -21,7 +18,7 @@ namespace BBM
|
||||
|
||||
WAL::Component *HealthComponent::clone(WAL::Entity &entity) const
|
||||
{
|
||||
return new HealthComponent(entity);
|
||||
return new HealthComponent(entity, this->_healthPoint, this->onDeath);
|
||||
}
|
||||
|
||||
void HealthComponent::addHealthPoint(unsigned int healthPoint)
|
||||
|
||||
Reference in New Issue
Block a user