public class AnimatedTiledMapTile extends java.lang.Object implements TiledMapTile
TiledMapTile.BlendMode| Constructor and Description |
|---|
AnimatedTiledMapTile(float interval,
Array<StaticTiledMapTile> frameTiles)
Creates an animated tile with the given animation interval and frame tiles.
|
AnimatedTiledMapTile(IntArray intervals,
Array<StaticTiledMapTile> frameTiles)
Creates an animated tile with the given animation intervals and frame tiles.
|
| Modifier and Type | Method and Description |
|---|---|
int[] |
getAnimationIntervals() |
TiledMapTile.BlendMode |
getBlendMode() |
TiledMapTile |
getCurrentFrame() |
int |
getCurrentFrameIndex() |
StaticTiledMapTile[] |
getFrameTiles() |
int |
getId() |
float |
getOffsetX() |
float |
getOffsetY() |
MapProperties |
getProperties() |
TextureRegion |
getTextureRegion() |
void |
setAnimationIntervals(int[] intervals) |
void |
setBlendMode(TiledMapTile.BlendMode blendMode)
Sets the
TiledMapTile.BlendMode to use for rendering the tile |
void |
setId(int id) |
void |
setOffsetX(float offsetX)
Set the amount to offset the x position when rendering the tile
|
void |
setOffsetY(float offsetY)
Set the amount to offset the y position when rendering the tile
|
void |
setTextureRegion(TextureRegion textureRegion)
Sets the texture region used to render the tile
|
static void |
updateAnimationBaseTime()
Function is called by BatchTiledMapRenderer render(), lastTiledMapRenderTime is used to keep all of the tiles in lock-step
animation and avoids having to call TimeUtils.millis() in getTextureRegion()
|
public AnimatedTiledMapTile(float interval,
Array<StaticTiledMapTile> frameTiles)
interval - The interval between each individual frame tile.frameTiles - An array of StaticTiledMapTiles that make up the animation.public AnimatedTiledMapTile(IntArray intervals, Array<StaticTiledMapTile> frameTiles)
intervals - The intervals between each individual frame tile in milliseconds.frameTiles - An array of StaticTiledMapTiles that make up the animation.public int getId()
getId in interface TiledMapTilepublic void setId(int id)
setId in interface TiledMapTilepublic TiledMapTile.BlendMode getBlendMode()
getBlendMode in interface TiledMapTileTiledMapTile.BlendMode to use for rendering the tilepublic void setBlendMode(TiledMapTile.BlendMode blendMode)
TiledMapTileTiledMapTile.BlendMode to use for rendering the tilesetBlendMode in interface TiledMapTileblendMode - the blend mode to use for rendering the tilepublic int getCurrentFrameIndex()
public TiledMapTile getCurrentFrame()
public TextureRegion getTextureRegion()
getTextureRegion in interface TiledMapTilepublic void setTextureRegion(TextureRegion textureRegion)
TiledMapTilesetTextureRegion in interface TiledMapTilepublic float getOffsetX()
getOffsetX in interface TiledMapTilepublic void setOffsetX(float offsetX)
TiledMapTilesetOffsetX in interface TiledMapTilepublic float getOffsetY()
getOffsetY in interface TiledMapTilepublic void setOffsetY(float offsetY)
TiledMapTilesetOffsetY in interface TiledMapTilepublic int[] getAnimationIntervals()
public void setAnimationIntervals(int[] intervals)
public MapProperties getProperties()
getProperties in interface TiledMapTilepublic static void updateAnimationBaseTime()
public StaticTiledMapTile[] getFrameTiles()