Class StaticTiledMapTile
- java.lang.Object
-
- com.badlogic.gdx.maps.tiled.tiles.StaticTiledMapTile
-
- All Implemented Interfaces:
TiledMapTile
public class StaticTiledMapTile extends java.lang.Object implements TiledMapTile
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.badlogic.gdx.maps.tiled.TiledMapTile
TiledMapTile.BlendMode
-
-
Constructor Summary
Constructors Constructor Description StaticTiledMapTile(TextureRegion textureRegion)Creates a static tile with the given regionStaticTiledMapTile(StaticTiledMapTile copy)Copy constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TiledMapTile.BlendModegetBlendMode()intgetId()MapObjectsgetObjects()floatgetOffsetX()floatgetOffsetY()MapPropertiesgetProperties()TextureRegiongetTextureRegion()voidsetBlendMode(TiledMapTile.BlendMode blendMode)Sets theTiledMapTile.BlendModeto use for rendering the tilevoidsetId(int id)voidsetOffsetX(float offsetX)Set the amount to offset the x position when rendering the tilevoidsetOffsetY(float offsetY)Set the amount to offset the y position when rendering the tilevoidsetTextureRegion(TextureRegion textureRegion)Sets the texture region used to render the tile
-
-
-
Constructor Detail
-
StaticTiledMapTile
public StaticTiledMapTile(TextureRegion textureRegion)
Creates a static tile with the given region- Parameters:
textureRegion- theTextureRegionto use.
-
StaticTiledMapTile
public StaticTiledMapTile(StaticTiledMapTile copy)
Copy constructor- Parameters:
copy- the StaticTiledMapTile to copy.
-
-
Method Detail
-
getId
public int getId()
- Specified by:
getIdin interfaceTiledMapTile
-
setId
public void setId(int id)
- Specified by:
setIdin interfaceTiledMapTile
-
getBlendMode
public TiledMapTile.BlendMode getBlendMode()
- Specified by:
getBlendModein interfaceTiledMapTile- Returns:
- the
TiledMapTile.BlendModeto use for rendering the tile
-
setBlendMode
public void setBlendMode(TiledMapTile.BlendMode blendMode)
Description copied from interface:TiledMapTileSets theTiledMapTile.BlendModeto use for rendering the tile- Specified by:
setBlendModein interfaceTiledMapTile- Parameters:
blendMode- the blend mode to use for rendering the tile
-
getProperties
public MapProperties getProperties()
- Specified by:
getPropertiesin interfaceTiledMapTile- Returns:
- tile's properties set
-
getObjects
public MapObjects getObjects()
- Specified by:
getObjectsin interfaceTiledMapTile- Returns:
- collection of objects contained in the tile
-
getTextureRegion
public TextureRegion getTextureRegion()
- Specified by:
getTextureRegionin interfaceTiledMapTile- Returns:
- texture region used to render the tile
-
setTextureRegion
public void setTextureRegion(TextureRegion textureRegion)
Description copied from interface:TiledMapTileSets the texture region used to render the tile- Specified by:
setTextureRegionin interfaceTiledMapTile
-
getOffsetX
public float getOffsetX()
- Specified by:
getOffsetXin interfaceTiledMapTile- Returns:
- the amount to offset the x position when rendering the tile
-
setOffsetX
public void setOffsetX(float offsetX)
Description copied from interface:TiledMapTileSet the amount to offset the x position when rendering the tile- Specified by:
setOffsetXin interfaceTiledMapTile
-
getOffsetY
public float getOffsetY()
- Specified by:
getOffsetYin interfaceTiledMapTile- Returns:
- the amount to offset the y position when rendering the tile
-
setOffsetY
public void setOffsetY(float offsetY)
Description copied from interface:TiledMapTileSet the amount to offset the y position when rendering the tile- Specified by:
setOffsetYin interfaceTiledMapTile
-
-