Skip to content

Commit

Permalink
Merge pull request #54 from YGNI-RType/feat/connection-systems
Browse files Browse the repository at this point in the history
updated ECS: spawnEntity return the entity Id
  • Loading branch information
Popochounet authored Oct 31, 2024
2 parents 13b7b47 + 12ad997 commit 839a465
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/ecs/system/Base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class Base : public IsSystem {
void registerComponent(void);

template <typename... Components>
void spawnEntity(Components &&...components);
entity::Entity spawnEntity(Components &&...components);

void killEntity(entity::Entity entity);

Expand Down
4 changes: 2 additions & 2 deletions include/ecs/system/Base.inl
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ void Base<Derived, DependTypes...>::registerComponent(void) {

template <class Derived, class... DependTypes>
template <typename... Components>
void Base<Derived, DependTypes...>::spawnEntity(Components &&...components) {
m_ecs->get().spawnEntity(std::forward<Components>(components)...);
entity::Entity Base<Derived, DependTypes...>::spawnEntity(Components &&...components) {
return m_ecs->get().spawnEntity(std::forward<Components>(components)...);
}

template <class Derived, class... DependTypes>
Expand Down

0 comments on commit 839a465

Please sign in to comment.