has

fun <T : Component> Entity.has(mapper: ComponentMapper<T>): Boolean

Checks whether the Entity has the specified Component.

Return

true if the Entity has the specified component, and false otherwise.

Parameters

mapper

the ComponentMapper to check the Component with.

Type Parameters

T

the Component type to inspect.

See also

ComponentMapper.has