SpatialPointerComponent


class SpatialPointerComponent : Component


Component that modifies the pointer icon. Adding or removing this component sets the entity's pointer to use the default, system-determined icon.

Summary

Public companion functions

SpatialPointerComponent
create(session: Session)

Creates a new SpatialPointerComponent.

Public functions

open Boolean
onAttach(entity: Entity)

Called when this component is attached to the entity.

open Unit
onDetach(entity: Entity)

Called when this component is detached from the entity.

Public properties

SpatialPointerIcon?

The SpatialPointerIcon that will be rendered on the component's entity.

Public companion functions

create

Added in 1.0.0-alpha04
fun create(session: Session): SpatialPointerComponent

Creates a new SpatialPointerComponent.

Parameters
session: Session

The session to use for creating the component.

Public functions

onAttach

open 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

open fun onDetach(entity: Entity): Unit

Called when this component is detached from the entity.

Parameters
entity: Entity

Entity this component is being detached from.

Public properties

spatialPointerIcon

Added in 1.0.0-alpha04
var spatialPointerIconSpatialPointerIcon?

The SpatialPointerIcon that will be rendered on the component's entity. A null value indicates the default pointer icon should be used.