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
create(session: Session)

Creates a new SpatialPointerComponent.

Public functions

open Boolean
onAttach(entity: Entity)

Called by an Entity when it attempts to add this Component to itself.

open Unit
onDetach(entity: Entity)

Called by an Entity when it attempts to detach this Component from itself.

Public properties

SpatialPointerIcon

The SpatialPointerIcon that will be rendered on the component's Entity when the pointer is located on the entity.

Public companion functions

create

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

Creates a new SpatialPointerComponent.

Parameters
session: Session

The Session to use for creating the component.

Public functions

onAttach

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

Called by an Entity when it attempts to add this Component to itself.

This method is restricted because it is only called from Entity.addComponent.

Parameters
entity: Entity

Entity to which this Component was attached.

Returns
Boolean

True if the Component was attached to the given Entity. False if the Entity did not support having this Component attached.

onDetach

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

Called by an Entity when it attempts to detach this Component from itself.

This method is restricted because it is only called from Entity.removeComponent.

Parameters
entity: Entity

Entity from which this Component was detached.

Public properties

spatialPointerIcon

Added in 1.0.0-alpha05
var spatialPointerIconSpatialPointerIcon

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.