mirror of
https://github.com/zoriya/Bomberman.git
synced 2026-05-28 00:31:50 +00:00
Add healthSystem
The component doesn't disable the entity anymore, the system does it by checking the component of the entity Co-Authored-By: Benjamin HENRY <44569175+EternalRat@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
//
|
||||
// Created by Tom Augier on 2021-05-20.
|
||||
// Edited by Benjamin Henry on 2021-05-20.
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "lib/wal/sources/System/System.hpp"
|
||||
|
||||
namespace BBM
|
||||
{
|
||||
//! @brief A system to handle Health entities.
|
||||
class HealthSystem : public WAL::System
|
||||
{
|
||||
public:
|
||||
//! @inherit
|
||||
const std::type_info &getComponent() const override;
|
||||
//! @inherit
|
||||
void onFixedUpdate(WAL::Entity &entity) override;
|
||||
|
||||
//! @brief A default constructor
|
||||
HealthSystem() = default;
|
||||
//! @brief A Health system is copy constructable
|
||||
HealthSystem(const HealthSystem &) = default;
|
||||
//! @brief A default destructor
|
||||
~HealthSystem() override = default;
|
||||
//! @brief A Health system is assignable.
|
||||
HealthSystem &operator=(const HealthSystem &) = default;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user