open class FakeComponent


Test-only implementation of Component

Summary

Public constructors

Public functions

open Boolean
onAttach(entity: Entity)

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

open Unit
onDetach(entity: Entity)

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

Public constructors

FakeComponent

Added in 1.0.0-alpha04
FakeComponent()

Public functions

onAttach

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

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

Parameters
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
open fun onDetach(entity: Entity): Unit

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

Parameters
entity: Entity

Entity the component detached from.