InteractableComponent


class InteractableComponent : Component


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

Summary

Public functions

open Boolean
onAttach(entity: Entity)

Attaches this component to the given entity.

open Unit
onDetach(entity: Entity)

Detaches this component from the given entity.

Public functions

onAttach

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

Attaches this component to the given entity.

Parameters
entity: Entity

The entity to attach this component to.

Returns
Boolean

true if the component was successfully attached, false otherwise.

onDetach

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

Detaches this component from the given entity.

Parameters
entity: Entity

The entity to detach this component from.