mirror of
https://github.com/zoriya/Bomberman.git
synced 2026-06-03 02:23:44 +00:00
display simpe stat, no update
This commit is contained in:
@@ -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>());
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user