public class TileLayer
extends java.lang.Object
TiledMap
Constructor and Description |
---|
TileLayer(int width,
int height) |
Modifier and Type | Method and Description |
---|---|
boolean |
containsProperty(java.lang.String propertyName)
Returns if the layer contains the specified property
|
int |
getHeight() |
int |
getIndex()
Returns the index in the
TiledMap of this layer |
java.lang.String |
getName()
Returns the name of this layer
|
java.lang.String |
getProperty(java.lang.String propertyName)
Returns the value of a specified property
|
int |
getTileId(int x,
int y)
Returns the tile id at a given coordinate on the layer
|
int |
getWidth() |
boolean |
isVisible() |
void |
setIndex(int index)
Sets the index in the
TiledMap of this layer |
void |
setName(java.lang.String name)
Sets the name of this layer
|
void |
setProperty(java.lang.String propertyName,
java.lang.String value)
Sets the value of a specified property
|
void |
setTileId(int x,
int y,
int id)
Sets the tile id at a given coordinate on the layer
|
void |
setVisible(boolean visible) |
public boolean containsProperty(java.lang.String propertyName)
propertyName
- The property name to search forpublic java.lang.String getProperty(java.lang.String propertyName)
propertyName
- The property name to search forpublic void setProperty(java.lang.String propertyName, java.lang.String value)
propertyName
- The property name to set the value forvalue
- The value of the property to setpublic int getIndex()
TiledMap
of this layerpublic void setIndex(int index)
TiledMap
of this layerindex
- The index of the layerpublic java.lang.String getName()
public void setName(java.lang.String name)
name
- The name to setpublic int getTileId(int x, int y)
x
- The x coordinate in tilesy
- The y coordinate in tilespublic void setTileId(int x, int y, int id)
x
- The x coordinate in tilesy
- The y coordinate in tilesid
- 0 if there is no tilepublic boolean isVisible()
public void setVisible(boolean visible)
public int getWidth()
public int getHeight()