Component
public abstract class Component
BoundsComponent |
A component that monitors the bounds of an entity and notifies registered listeners of changes. |
InteractableComponent |
Provides access to raw |
MovableComponent |
This |
PointerCaptureComponent |
Provides pointer capture capabilities for a given |
PositionalAudioComponent |
A Component that provides positional spatial audio playback for an |
ResizableComponent |
This |
SoundEffectPoolComponent |
Provides positional sound pool audio playback for an |
SoundFieldAudioComponent |
Provides spatial audio playback for a sound field associated with an |
SpatialPointerComponent |
|
A Component adds functionality or behaviors to an Entity.
Summary
Protected methods |
|
|---|---|
abstract boolean |
Called by the framework when this component is being added to an |
abstract void |
Called by the framework when this component is being removed from an |
Protected methods
onAttach
protected abstract boolean onAttach(@NonNull Entity entity)
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.
| Returns | |
|---|---|
boolean |
|
onDetach
protected abstract void onDetach(@NonNull Entity entity)
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.