mirror of
https://github.com/zoriya/Bomberman.git
synced 2026-06-01 09:45:42 +00:00
system basic
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
//
|
||||
// Created by Tom Augier on 05/06/2021
|
||||
//
|
||||
|
||||
#include "ScoreSystem.hpp"
|
||||
#include <map>
|
||||
|
||||
namespace BBM {
|
||||
|
||||
ScoreSystem::ScoreSystem(WAL::Wal &wal)
|
||||
: System(wal)
|
||||
{}
|
||||
|
||||
void ScoreSystem::onSelfUpdate()
|
||||
{
|
||||
ScoreComponent::Score maxScore = ScoreComponent::Score::PLAYING;
|
||||
|
||||
for (auto &[_, score, _], this->_wal.getScene()->view<PositionComponent, CollisionComponent>())
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "System/System.hpp"
|
||||
#include "Component/Score/ScoreComponent.hpp"
|
||||
#include "Component/Health/HealthComponent.hpp"
|
||||
#include "Wal.hpp"
|
||||
|
||||
namespace BBM
|
||||
{
|
||||
class ScoreSystem : public WAL::System<ScoreComponent, HealthComponent>
|
||||
{
|
||||
public:
|
||||
//! @inherit
|
||||
void onFixedUpdate(WAL::ViewEntity<ScoreComponent, HealthComponent> &entity) override;
|
||||
|
||||
//! @brief ctor
|
||||
ScoreSystem(WAL::Wal &wal);
|
||||
//! @brief Default copy ctor
|
||||
ScoreSystem(const ScoreSystem &) = default;
|
||||
//! @brief Default dtor
|
||||
~ScoreSystem() override = default;
|
||||
//! @brief A SoundManager screen system can't be assigned.
|
||||
ScoreSystem &operator=(const ScoreSystem &) = delete;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user