InteractableComponent


public final class InteractableComponent implements Component


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

Summary

Public methods

boolean

Attaches this component to the given entity.

void

Detaches this component from the given entity.

Public methods

onAttach

Added in 1.0.0-alpha01
public boolean onAttach(@NonNull Entity entity)

Attaches this component to the given entity.

Parameters
@NonNull 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
public void onDetach(@NonNull Entity entity)

Detaches this component from the given entity.

Parameters
@NonNull Entity entity

The entity to detach this component from.