Some checks reported errors
continuous-integration/drone/push Build was killed
feat: surface system This commit puts the project in major jeopardy as it overhauls the architecture such as removing the layer stack completely, etc. I am filled with determination.
27 lines
684 B
C++
27 lines
684 B
C++
#include <surface/system.hpp>
|
|
|
|
namespace lt::surface {
|
|
|
|
System::System(Ref<ecs::Registry> registry): m_registry(std::move(registry))
|
|
{
|
|
m_registry->get_entt_registry()
|
|
.on_construct<SurfaceComponent>()
|
|
.connect<&System::on_surface_construct>(this);
|
|
|
|
m_registry->get_entt_registry()
|
|
.on_destroy<SurfaceComponent>()
|
|
.connect<&System::on_surface_destroy>(this);
|
|
}
|
|
|
|
System::~System()
|
|
{
|
|
m_registry->get_entt_registry()
|
|
.on_construct<SurfaceComponent>()
|
|
.disconnect<&System::on_surface_construct>(this);
|
|
|
|
m_registry->get_entt_registry()
|
|
.on_destroy<SurfaceComponent>()
|
|
.disconnect<&System::on_surface_destroy>(this);
|
|
}
|
|
|
|
} // namespace lt::surface
|