mirror of
https://gitlab.com/voidframe/voidframe-cpp.git
synced 2026-10-12 02:10:08 -04:00
Add Entity::HasComponents() wrapper
This commit is contained in:
1 parent
1166bc8911
commit
650925b4e1
2 files changed
+5
No files matched your search
@@ -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;
|
||||
}
|
||||
Reference in new issue
Block a user