Add Entity::HasComponents() wrapper

This commit is contained in:
Maple Redleaf committed 2025-11-10 12:19:38 -06:00
1 parent 1166bc8911
commit 650925b4e1
2 files changed
+5

No files matched your search

+4
View File
@@ -17,3 +17,7 @@ template <typename CompT> CompT *Entity::GetComponent() {
return dynamic_cast<CompT *>(comp_ptr.get());
}
}
template <typename CompT> bool Entity::HasComponent() {
return GetComponent<CompT>() != nullptr;
}