简体   繁体   中英

Slick2d's TiledMap.getTileProperty's String “def” field

I am trying to use Slick2d to write a basic game am using the Tiled tilemap editor to make the game terrain. Each type of tile in the map has a property known as "id" with a known string as a value.

I am using Slick2d's method:

TiledMap.getTileProperty(int tileID, java.lang.String propertyName, java.lang.String def)

to get the property of an individual tile. I believe my implementation works, but does anyone know what the "def" field should be? I think propertyName should be "id" and tileID being the getTileId method.

Thanks a lot!

def means default value. If the value isn't set this value gets used.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM