Skip to content

Creating Entities

Faulty edited this page Jun 29, 2021 · 2 revisions

Creating an Entity

To create a new entity, you'll want to create a new object and set the parent to the Entity object. This will ensure that on creation of that entity, a __components struct is created to hold all the components the entity has. Also it will ensure that when the entity is deleted, the clean up event will remove all components that the entity had defined.

Adding and Manipulating Component Data on Entities

To add a new component onto an entity, you'll want to the the component_add(instance_id, component_data) function.