This repository was archived by the owner on Jul 14, 2021. It is now read-only.
This repository was archived by the owner on Jul 14, 2021. It is now read-only.
Entity Hierarchies #36
Open
Description
To resolve #34, entity hierarchies need to be implemented. This should be done in the form:
EntityRef parent;
EntityRef child;
child.SetParent(parent);
Behind the scenes:
- The parent should have
child
added to a vector of children - The child should have its
parent
handle set to its new parent - Any component with a member of the form
ComponentHandle<T> Parent;
on the child should have theParent
member set to the parent's component of that type, if it has one. - Any component with a
Parent
member where!std::is_same_v<T, Component>
should result in a compile time error - Any component containing a Parent handle should have its parent set when added to a child entity.