Reworking systems

This commit is contained in:
Zoe Roux
2021-06-04 00:50:38 +02:00
parent 4f14d380bf
commit 306f07972d
22 changed files with 129 additions and 177 deletions
+5 -4
View File
@@ -5,25 +5,26 @@
#pragma once
#include "Component/Movable/MovableComponent.hpp"
#include "System/System.hpp"
#include "Entity/Entity.hpp"
namespace BBM
{
//! @brief A system to handle movable entities. This system update velocity based on accelerations and positions based on velocity.
class MovableSystem : public WAL::System
class MovableSystem : public WAL::System<MovableComponent, PositionComponent>
{
public:
//! @inherit
void onFixedUpdate(WAL::Entity &entity) override;
//! @brief A default constructor
MovableSystem();
explicit MovableSystem(WAL::Wal &wal);
//! @brief A movable system is copy constructable
MovableSystem(const MovableSystem &) = default;
//! @brief A default destructor
~MovableSystem() override = default;
//! @brief A movable system is assignable.
MovableSystem &operator=(const MovableSystem &) = default;
//! @brief A system is not assignable.
MovableSystem &operator=(const MovableSystem &) = delete;
};
} // namespace WAL