get

operator fun <T : EntitySystem> Engine.get(type: KClass<T>): T?

Return

the EntitySystem of the given type. May be null if it does not exist.

Parameters

type

type of the system to retrieve.

See also

Engine.getSystem

operator fun <T : Component> Entity.get(mapper: ComponentMapper<T>): T?

Gets the specified Component from the Entity with a ComponentMapper.

Return

the specified Component. Otherwise null if the Entity does not have it.

Parameters

T

the Component type to get

mapper

the ComponentMapper to retrieve the Component with

See also

ComponentMapper.get

inline fun <T : Component> Entity.get(): T?

Gets the specified Component from the Entity.

Note that this function provides O(log n) performance for Component retrieval. It is recommended that retrieving a Component is done using get consuming a ComponentMapper.

Return

the specified Component. Otherwise null if the Entity does not have it.

Parameters

T

the Component type to search for.

See also

ComponentMapper