2022-11-11 00:07:05 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "../../renderable.h"
|
|
|
|
|
2022-12-04 06:32:16 +00:00
|
|
|
#include <rttr/rttr_enable.h>
|
|
|
|
|
2022-11-11 00:07:05 +00:00
|
|
|
namespace simpleengine::ecs {
|
|
|
|
class Entity;
|
|
|
|
class Registry;
|
|
|
|
|
|
|
|
namespace system {
|
|
|
|
class System : public simpleengine::Renderable {
|
2022-12-04 06:32:16 +00:00
|
|
|
RTTR_ENABLE()
|
2022-11-11 00:07:05 +00:00
|
|
|
protected:
|
|
|
|
std::shared_ptr<Registry> entity_registry;
|
|
|
|
public:
|
|
|
|
System(std::shared_ptr<Registry> entity_registry);
|
|
|
|
|
|
|
|
ecs::Entity create_entity();
|
|
|
|
|
|
|
|
virtual void update(const float& delta_time) = 0;
|
|
|
|
virtual void input_update(const float& delta_time) = 0;
|
|
|
|
virtual void render(const float& interpolate_alpha, const float& frame_time) = 0;
|
|
|
|
virtual void destroy() = 0;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|