feat(ecs): add "add" function to Entity
This commit is contained in:
parent
fa1bfaae1e
commit
34fa8344ac
1 changed files with 6 additions and 0 deletions
|
@ -15,6 +15,12 @@ public:
|
|||
ensure(m_registry, "Failed to create Entity ({}): null registry", m_identifier);
|
||||
}
|
||||
|
||||
template<typename Component_T>
|
||||
auto add(Component_T component) -> Component_T &
|
||||
{
|
||||
return m_registry->add(m_identifier, component);
|
||||
}
|
||||
|
||||
template<typename Component_T>
|
||||
auto get() -> Component_T &
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue