interface Component

Known direct subclasses
InteractableComponent

Provides access to raw input events for given Entity, so a client can implement their own interaction logic.

MovableComponent

Allows users to interactively move the Entity.

PointerCaptureComponent

Provides pointer capture capabilities for a given entity.

ResizableComponent

A Component which when attached to a PanelEntity provides a user-resize affordance.


Base interface for all components.

Components are attached to entities, to add functionality to those entities.

Summary

Public functions

Boolean
onAttach(entity: Entity)

Called when this component is attached to the entity.

Unit
onDetach(entity: Entity)

Called when this component is detached from the entity.

Public functions

onAttach

Added in 1.0.0-alpha01
fun onAttach(entity: Entity): Boolean

Called when this component is attached to the entity.

Parameters
entity: Entity

Entity this component is being attached to.

Returns
Boolean

True if the component can attach to given Entity.

onDetach

Added in 1.0.0-alpha01
fun onDetach(entity: Entity): Unit

Called when this component is detached from the entity.

Parameters
entity: Entity

Entity this component is being detached from.