Skip to content
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
Open
@Masstronaut

Description

@Masstronaut

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:

  1. The parent should have child added to a vector of children
  2. The child should have its parent handle set to its new parent
  3. Any component with a member of the form ComponentHandle<T> Parent; on the child should have the Parent member set to the parent's component of that type, if it has one.
  4. Any component with a Parent member where !std::is_same_v<T, Component> should result in a compile time error
  5. Any component containing a Parent handle should have its parent set when added to a child entity.

Metadata

Metadata

Assignees

Labels

MVPRequired functionality for the engine MVP

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions