property

inline fun <T> MapLayer.property(key: String): T

Extension method to directly access the MapProperties of a MapLayer. If the property is not defined then this method throws a MissingPropertyException.

Return

value of the property.

Parameters

key

property name.

Throws

If the property is not defined.


inline fun <T> MapLayer.property(key: String, defaultValue: T): T

Extension method to directly access the MapProperties of a MapLayer. The type is automatically derived from the type of the given default value. If the property is not defined the defaultValue will be returned.

Return

value of the property or defaultValue if property is missing.

Parameters

key

property name.

defaultValue

default value in case the property is missing.


inline fun <T> MapObject.property(key: String): T

Extension method to directly access the MapProperties of a MapObject. If the property is not defined then this method throws a MissingPropertyException.

Return

value of the property.

Parameters

key

property name.

Throws

If the property is not defined.


inline fun <T> MapObject.property(key: String, defaultValue: T): T

Extension method to directly access the MapProperties of a MapObject. The type is automatically derived from the type of the given default value. If the property is not defined the defaultValue will be returned.

Return

value of the property or defaultValue if property is missing.

Parameters

key

property name.

defaultValue

default value in case the property is missing.


inline fun <T> TiledMapTileSet.property(key: String): T

Extension method to directly access the MapProperties of a TiledMapTileSet. If the property is not defined then this method throws a MissingPropertyException.

Return

value of the property.

Parameters

key

property name.

Throws

If the property is not defined.


inline fun <T> TiledMapTileSet.property(key: String, defaultValue: T): T

Extension method to directly access the MapProperties of a TiledMapTileSet. The type is automatically derived from the type of the given default value. If the property is not defined the defaultValue will be returned.

Return

value of the property or defaultValue if property is missing.

Parameters

key

property name.

defaultValue

default value in case the property is missing.


inline fun <T> TiledMapTile.property(key: String): T

Extension method to directly access the MapProperties of a TiledMapTile. If the property is not defined then this method throws a MissingPropertyException.

Return

value of the property.

Parameters

key

property name.

Throws

If the property is not defined.


inline fun <T> TiledMapTile.property(key: String, defaultValue: T): T

Extension method to directly access the MapProperties of a TiledMapTile. The type is automatically derived from the type of the given default value. If the property is not defined the defaultValue will be returned.

Return

value of the property or defaultValue if property is missing.

Parameters

key

property name.

defaultValue

default value in case the property is missing.


inline fun <T> TiledMap.property(key: String): T

Extension method to directly access the MapProperties of a TiledMap. If the property is not defined then this method throws a MissingPropertyException.

Return

value of the property.

Parameters

key

property name.

Throws

If the property is not defined.


inline fun <T> TiledMap.property(key: String, defaultValue: T): T

Extension method to directly access the MapProperties of a TiledMap. The type is automatically derived from the type of the given default value. If the property is not defined the defaultValue will be returned.

Return

value of the property or defaultValue if property is missing.

Parameters

key

property name.

defaultValue

default value in case the property is missing.