r-type  0.0.0
R-Type main
Loading...
Searching...
No Matches
ISystems.hpp
Go to the documentation of this file.
1///
2/// @file Systems.hpp
3/// @brief This file contains the system definitions
4/// @namespace eng
5///
6
7#pragma once
8
9#include "ECS/Registry.hpp"
10
11namespace eng
12{
13
14 class ISystem
15 {
16 public:
17 virtual ~ISystem() = default;
18 virtual void update(ecs::Registry &registry, float dt) = 0;
19 virtual bool isEnable() = 0;
20 virtual void setEnable(bool enable) = 0;
21 };
22
23 class ASystem : public ISystem
24 {
25 public:
26 bool isEnable() override { return m_isEnable; }
27 void setEnable(const bool enable) override { m_isEnable = enable; }
28
29 private:
30 bool m_isEnable = true;
31 };
32
33} // namespace eng
This file contains the Registry class declaration.
Class for managing entities and their components.
Definition Registry.hpp:25
bool m_isEnable
Definition ISystems.hpp:30
void setEnable(const bool enable) override
Definition ISystems.hpp:27
bool isEnable() override
Definition ISystems.hpp:26
virtual void setEnable(bool enable)=0
virtual bool isEnable()=0
virtual void update(ecs::Registry &registry, float dt)=0
virtual ~ISystem()=default