Live Data Reference #

Entity Class #

An Entity data class has the following properties and functions:

PropertyDescription
entityName: EntityNameThe name for a type of data in your player data feature. This name does not have to be unique, but it must be different compared to other Component declarations.
instancedId: UUIDThe unique ID for the instance of the Entity.
componentContainers: MutableList<ComponentContainer>The list of Components belonging to the specific Entity.
getComponents()Returns a list of Components.
addComponent()Fetches a Component, creates a ComponentContainer for said Component, and then adds the newly created ComponentContainer to the componentContainers collection.
removeComponent(componentId: UUID)Removes a Component from the componentsContainers collection by its componentId.
removeComponent(component: Component)Removes Component(s) from the componentsContainers collection.
getComponentsByType<reified T: Component>()Returns a list of Components that are an instance of the generic parameter.

Component Container Class #

A ComponentContainer data class has the following properties:

PropertyDescription
componentId: UUIDThe unique ID that identifies the Component and helps with data persistence.
component: ComponentUtilized by the engine layer to contain the Component.