display simpe stat, no update

This commit is contained in:
arthur.jamet
2021-06-16 16:32:07 +02:00
parent b81fefc4e0
commit a11eef468c
9 changed files with 221 additions and 10 deletions
+17
View File
@@ -0,0 +1,17 @@
//
// Created by hbenjamin on 09/06/2021.
//
#include "BonusUISystem.hpp"
namespace BBM
{
BonusUISystem::BonusUISystem(WAL::Wal &wal)
: System(wal)
{}
void BonusUISystem::onFixedUpdate(WAL::ViewEntity<StatComponent, Drawable2DComponent> &entity)
{
entity.get<StatComponent>().updater(entity.get<Drawable2DComponent>());
}
}
+32
View File
@@ -0,0 +1,32 @@
//
//
//
#pragma once
#include "System/System.hpp"
#include "Wal.hpp"
#include "Component/Renderer/Drawable2DComponent.hpp"
#include "Component/Stat/StatComponent.hpp"
namespace BBM
{
//! @brief The system that allow the text of the ui to display current values
class BonusUISystem : public WAL::System<StatComponent, Drawable2DComponent>
{
private:
public:
//! @inherit
void onFixedUpdate(WAL::ViewEntity<StatComponent, Drawable2DComponent> &entity) override;
//! @brief A default constructor
explicit BonusUISystem(WAL::Wal &wal);
//! @brief A bomb holder system is copy constructable
BonusUISystem(const BonusUISystem &) = default;
//! @brief A default destructor
~BonusUISystem() override = default;
//! @brief A bomb holder system is not assignable.
BonusUISystem &operator=(const BonusUISystem &) = delete;
};
}