propertyFor

inline fun <T : Component> propertyFor(mapper: ComponentMapper<T> = mapperFor()): ComponentDelegate<T>

Returns a delegated property for the Entity class to access the given Component. Allows accessing and setting mandatory components assigned to entities with the property syntax.

Passing a mapper is optional; if no value is given, it will create a new ComponentMapper for the chosen Component class.

See also