Can now rename entities pressing f2 or double clicking and selecting an entity should unfold the tree
This commit is contained in:
@@ -213,6 +213,31 @@ namespace Nuake
|
||||
return currentEntity;
|
||||
}
|
||||
|
||||
bool Scene::EntityIsParent(Entity entity, Entity parent)
|
||||
{
|
||||
if (!entity.IsValid())
|
||||
return false;
|
||||
|
||||
if (entity.GetComponent<ParentComponent>().HasParent && entity.GetComponent<ParentComponent>().Parent == parent)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
Entity current = entity;
|
||||
while (current.GetComponent<ParentComponent>().HasParent && current != parent)
|
||||
{
|
||||
current = current.GetComponent<ParentComponent>().Parent;
|
||||
|
||||
if (current == parent)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Scene::OnInit()
|
||||
{
|
||||
for (auto& system : m_Systems)
|
||||
|
||||
Reference in New Issue
Block a user