Name | Summary |
---|---|
Entity | constructor(dataModel: DataModel, id: Long) Constructor for creating an entity with a specified data model and ID. constructor(dataModel: DataModel, id: Int) Constructor for creating an entity with a specified data model and integer ID. constructor(id: Long) Constructor for creating an entity with a default data model and specified ID. constructor(id: Int) Constructor for creating an entity with a default data model and integer ID. constructor(dataModel: DataModel, id: Long, components: List<ComponentBase>) Constructor for creating an entity with a specified data model, ID, and list of components. constructor(dataModel: DataModel, id: Long, vararg components: ComponentBase) Constructor for creating an entity with a specified data model, ID, and variable number of components. |
Name | Summary |
---|---|
Companion | object Companion |
Name | Summary |
---|---|
dataModel | var dataModel: DataModel The data model associated with this entity. |
id | var id: Long The unique identifier for this entity. |
Name | Summary |
---|---|
addName | fun Entity.addName(name: String): Entity |
addToMap | fun addToMap(attribute: Int, value: <Error class: unknown class><out <Error class: unknown class>, out <Error class: unknown class>>) |
destroy | fun destroy() Destroys this entity. |
destroyWithChildren | fun Entity.destroyWithChildren() |
equals | open operator override fun equals(o: Any?): Boolean |
getComponent | inline fun <T : ComponentBase> getComponent(): T |
getComponentData | fun getComponentData(componentData: MutableMap<Int, <Error class: unknown class><AttributeType, Any?>>, cachable: Boolean) Gets component data for the entity. |
getMap | inline fun <T, V> getMap(attribute: Int): <Error class: unknown class><T, V> |
hasComponent | inline fun <T : ComponentBase> hasComponent(): Boolean |
hashCode | open override fun hashCode(): Int |
isLocal | fun isLocal(): Boolean Returns whether the entity is local or not. |
readIntoComponent | fun <T : ComponentBase> readIntoComponent(cls: <Error class: unknown class><T, Boolean>): T |
registerEventListener | fun <T : EventArgs> registerEventListener(eventName: String, listener: (entity: Entity, eventArgs: T) -> Unit): Entity Registers an event listener for a specific event. |
setComponent | fun setComponent(c: ComponentBase): Entity Sets a single component for this entity. |
setComponentData | fun setComponentData(componentData: MutableMap<Int, <Error class: unknown class><AttributeType, Any?>>, componentID: Int) Sets component data for the entity. |
setComponents | fun setComponents(vararg components: ComponentBase): Entity fun setComponents(components: List<ComponentBase>): Entity Sets the components for this entity. |
setMap | fun setMap(attribute: Int, value: <Error class: unknown class><out <Error class: unknown class>, out <Error class: unknown class>>) |
tryGetComponent | inline fun <T : ComponentBase> tryGetComponent(): T? |
tryGetMapValue | inline fun <T, V> tryGetMapValue(attribute: Int, key: T): V? |
tryReadIntoComponent | fun <T : ComponentBase> tryReadIntoComponent(cls: <Error class: unknown class><T, Boolean>, componentTypeID: Int): T? |
trySetMapValue | inline fun <T, V> trySetMapValue(attribute: Int, key: T, value: T): Boolean |
Name | Summary |
---|---|
create | fun create(): Entity Creates a new entity with the default data model. fun create(component: ComponentBase): Entity Creates a new entity with the specified component. fun create(dm: DataModel): Entity Creates a new entity with the specified data model. fun create(vararg components: ComponentBase): Entity Creates a new entity with the specified variable number of components. fun create(components: List<ComponentBase>): Entity Creates a new entity with the specified list of components. |
createPanelEntity | fun Entity.Companion.createPanelEntity(panelId: Int, transform: Transform, vararg components: ComponentBase): Entity fun Entity.Companion.createPanelEntity(entityId: Int, panelId: Int, transform: Transform, vararg components: ComponentBase): Entity |
fromBox | fun Entity.Companion.fromBox(length: Float, transform: Transform, material: Material? = null, vararg components: ComponentBase): Entity |
fromGLB | fun Entity.Companion.fromGLB(mesh: Mesh, transform: Transform, vararg components: ComponentBase): Entity |
fromMeshAndMaterial | fun Entity.Companion.fromMeshAndMaterial(mesh: Mesh, material: Material, transform: Transform, vararg components: ComponentBase): Entity |
fromPanelRegistry | fun Entity.Companion.fromPanelRegistry(registry: PanelRegistration, transform: Transform, vararg components: ComponentBase): Entity |
fromSphere | fun Entity.Companion.fromSphere(length: Float, transform: Transform, material: Material? = null, vararg components: ComponentBase): Entity |
nullEntity | fun nullEntity(): Entity Creates a null entity. |