aboutsummaryrefslogtreecommitdiff
path: root/mwe/ecs-homemade/src/main.cpp
diff options
context:
space:
mode:
authorMax-001 <80035972+Max-001@users.noreply.github.com>2024-10-02 17:01:47 +0200
committerMax-001 <80035972+Max-001@users.noreply.github.com>2024-10-02 17:01:47 +0200
commit8b69b8cb28f0ef43d1039b7616ca893344e236cd (patch)
tree4bf43556f056cb04a047187fc5e67ea6bc4f0bc8 /mwe/ecs-homemade/src/main.cpp
parent0b6a5731401348ab5931a80e07e134ae460d9955 (diff)
Added DeleteAllComponentsOfId methode
Diffstat (limited to 'mwe/ecs-homemade/src/main.cpp')
-rw-r--r--mwe/ecs-homemade/src/main.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/mwe/ecs-homemade/src/main.cpp b/mwe/ecs-homemade/src/main.cpp
index f0b94f0..2ee6edd 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().DeleteComponentsById<Sprite>(gameObect2.mId);
- gameObect2.AddComponent<Sprite>();
+ ComponentManager::GetInstance().DeleteAllComponentsOfId(gameObect0.mId);
+ gameObect0.AddComponent<Rigidbody>(-10, -120, -564);
std::cout << "Finding all rigidbodies of entity 3" << std::endl;
std::vector<std::reference_wrapper<Rigidbody>> rigidbodyOfEntity3 = ComponentManager::GetInstance().GetComponentsByID<Rigidbody>(gameObect3.mId);