SpatialPointerComponent
class SpatialPointerComponent : Component
Component that modifies the pointer icon that is rendered on the component's Entity. If this Component is not present on an Entity the default, system-determined icon is used. Removing this Component will set the Entity's pointer back to the default icon.
Summary
Public companion functions |
|
|---|---|
SpatialPointerComponent |
Creates a new |
Protected functions |
|
|---|---|
open Boolean |
Called by the framework when this component is being added to an |
open Unit |
Called by the framework when this component is being removed from an |
Public properties |
|
|---|---|
SpatialPointerIcon |
The |
Public companion functions
create
fun create(session: Session): SpatialPointerComponent
Creates a new SpatialPointerComponent.
| Returns | |
|---|---|
SpatialPointerComponent |
A new |
Protected functions
onAttach
protected open fun onAttach(entity: Entity): Boolean
Called by the framework when this component is being added to an Entity.
This method is triggered when Entity.addComponent is invoked. Implementations should override this method to perform setup logic or to validate if the component is compatible with the provided entity.
onDetach
protected open fun onDetach(entity: Entity): Unit
Called by the framework when this component is being removed from an Entity.
This method is triggered when Entity.removeComponent is invoked. Implementations should override this method to release resources or undo any changes made during onAttach.
Public properties
spatialPointerIcon
var spatialPointerIcon: SpatialPointerIcon
The SpatialPointerIcon that will be rendered on the component's Entity when the pointer is located on the entity. A SpatialPointerIcon.DEFAULT value indicates the default pointer icon should be used.