From 34fa8344acfa1cf550fad091ca40bedac45969a6 Mon Sep 17 00:00:00 2001 From: light7734 Date: Thu, 25 Sep 2025 22:23:32 +0330 Subject: [PATCH] feat(ecs): add "add" function to Entity --- modules/ecs/public/entity.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/ecs/public/entity.hpp b/modules/ecs/public/entity.hpp index 4c0ea67..5968b8f 100644 --- a/modules/ecs/public/entity.hpp +++ b/modules/ecs/public/entity.hpp @@ -15,6 +15,12 @@ public: ensure(m_registry, "Failed to create Entity ({}): null registry", m_identifier); } + template + auto add(Component_T component) -> Component_T & + { + return m_registry->add(m_identifier, component); + } + template auto get() -> Component_T & {