Template Function. Used for add specific component to entity.
54 {
55 if (HasComponent<T>())
56 {
57 std::stringstream ss;
58 ss <<
"Entity: " << (int)
m_EntityHandle <<
" already has such component.";
59
60 SPICES_CORE_WARN(ss.str())
62 }
63
65 m_World->OnComponentAdded<T>(this, component);
66 return component;
67 }
T & AddComponent(Args &&... args)
Template Function. Used for add specific component to entity.
entt::entity m_EntityHandle
This entity's identify in ECS.
T & GetComponent() const
Get Component owned by this entity.
World * m_World
A specific world Pointer.