Added EntityExists and HasComponent

This commit is contained in:
2026-01-28 14:29:47 +02:00
parent 4cc10ddc21
commit f760cfd658
2 changed files with 12 additions and 4 deletions

View File

@@ -69,8 +69,7 @@ public:
template <Component component>
[[nodiscard("Discarding an expensive operation's result!")]]
bool HasComponent(const Entity &entity) {
// TO BE IMPLEMENTED
return true;
return entityComponentMap.query(entity, typeid(component)).size();
}
template <Component component>