create

inline fun <T : Component> Engine.create(configure: T.() -> Unit = {}): T

Get or create a Component by calling Engine.createComponent.

The Component must have a visible no-arg constructor.

Return

an Component instance of the selected type.

Parameters

T

the type of Component to get or create.

configure

inlined function with T as the receiver to allow further configuration.

Throws

if the engine was unable to create the component