diff options
Diffstat (limited to 'mwe/ecs-homemade/src/main.cpp')
-rw-r--r-- | mwe/ecs-homemade/src/main.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mwe/ecs-homemade/src/main.cpp b/mwe/ecs-homemade/src/main.cpp index e1ca9e9..f0b94f0 100644 --- a/mwe/ecs-homemade/src/main.cpp +++ b/mwe/ecs-homemade/src/main.cpp @@ -69,8 +69,8 @@ int main() { } std::cout << std::endl; - ComponentManager::GetInstance().DeleteComponents<Sprite>(); - gameObect5.AddComponent<Sprite>(); + ComponentManager::GetInstance().DeleteComponentsById<Sprite>(gameObect2.mId); + gameObect2.AddComponent<Sprite>(); std::cout << "Finding all rigidbodies of entity 3" << std::endl; std::vector<std::reference_wrapper<Rigidbody>> rigidbodyOfEntity3 = ComponentManager::GetInstance().GetComponentsByID<Rigidbody>(gameObect3.mId); |