mirror of
https://github.com/zoriya/Bomberman.git
synced 2026-05-31 09:32:02 +00:00
removed positioncomponent into healthsystem
This commit is contained in:
@@ -23,10 +23,9 @@ namespace BBM
|
||||
: System(wal)
|
||||
{}
|
||||
|
||||
void HealthSystem::onFixedUpdate(WAL::ViewEntity<HealthComponent, PositionComponent> &entity)
|
||||
void HealthSystem::onFixedUpdate(WAL::ViewEntity<HealthComponent> &entity)
|
||||
{
|
||||
auto &health = entity.get<HealthComponent>();
|
||||
auto &position = entity.get<PositionComponent>();
|
||||
|
||||
if (health.getHealthPoint() == 0) {
|
||||
health.onDeath(entity, this->_wal);
|
||||
|
||||
@@ -13,12 +13,12 @@
|
||||
namespace BBM
|
||||
{
|
||||
//! @brief A system to handle Health entities.
|
||||
class HealthSystem : public WAL::System<HealthComponent, PositionComponent>
|
||||
class HealthSystem : public WAL::System<HealthComponent>
|
||||
{
|
||||
private:
|
||||
public:
|
||||
//! @inherit
|
||||
void onFixedUpdate(WAL::ViewEntity<HealthComponent, PositionComponent> &entity) override;
|
||||
void onFixedUpdate(WAL::ViewEntity<HealthComponent> &entity) override;
|
||||
|
||||
//! @brief A default constructor
|
||||
explicit HealthSystem(WAL::Wal &wal);
|
||||
|
||||
Reference in New Issue
Block a user