Trying to merge with develop

This commit is contained in:
Zoe Roux
2021-06-07 14:40:24 +02:00
112 changed files with 2955 additions and 1081 deletions
+3 -6
View File
@@ -10,15 +10,12 @@ using namespace std::chrono_literals;
namespace BBM
{
TimerSystem::TimerSystem(WAL::Wal &wal)
: WAL::System({
typeid(TimerComponent)
}),
_wal(wal)
: System(wal)
{}
void TimerSystem::onUpdate(WAL::Entity &entity, std::chrono::nanoseconds dtime)
void TimerSystem::onUpdate(WAL::ViewEntity<TimerComponent> &entity, std::chrono::nanoseconds dtime)
{
auto &timer = entity.getComponent<TimerComponent>();
auto &timer = entity.get<TimerComponent>();
timer.ringIn -= dtime;
if (timer.ringIn <= 0ns) {
timer.setDisable(true);
+3 -5
View File
@@ -6,17 +6,15 @@
#include <System/System.hpp>
#include <Wal.hpp>
#include <Component/Timer/TimerComponent.hpp>
namespace BBM
{
class TimerSystem : public WAL::System
class TimerSystem : public WAL::System<TimerComponent>
{
private:
//! @brief The wal engine
WAL::Wal &_wal;
public:
//! @inherit
void onUpdate(WAL::Entity &entity, std::chrono::nanoseconds dtime) override;
void onUpdate(WAL::ViewEntity<TimerComponent> &entity, std::chrono::nanoseconds dtime) override;
//! @brief A default constructor
TimerSystem(WAL::Wal &);