SpiecsEngine
 
Loading...
Searching...
No Matches

◆ HasComponent()

template<typename T >
bool Spices::World::HasComponent ( entt::entity e)

If Component is owned by this entity or not.

Template Parameters
TWhich Component we will search.
Parameters
[in]eentt::entity.
Returns
Returns true if found.

Definition at line 376 of file World.h.

377 {
379
380 std::shared_lock<std::shared_mutex> lock(m_Mutex);
381
382 return m_Registry.all_of<T>(e);
383 }
#define SPICES_PROFILE_ZONE
entt::registry m_Registry
This variable handles all entity.
Definition World.h:250
std::shared_mutex m_Mutex
Mutex for world.
Definition World.h:245