public class FakeComponent


Test-only implementation of Component

Summary

Public constructors

Public methods

boolean

Lifecycle event, called when component is attached to an Entity.

void

Lifecycle event, called when component is detached from an Entity.

Public constructors

FakeComponent

Added in 1.0.0-alpha04
public FakeComponent()

Public methods

onAttach

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

Lifecycle event, called when component is attached to an Entity.

Parameters
@NonNull Entity entity

Entity the component is attached to.

Returns
boolean

True if the component can attach to the given entity.

onDetach

Added in 1.0.0-alpha04
public void onDetach(@NonNull Entity entity)

Lifecycle event, called when component is detached from an Entity.

Parameters
@NonNull Entity entity

Entity the component detached from.