com.badlogic.gdx.maps.tiled.tiles
Class AnimatedTiledMapTile
java.lang.Object
com.badlogic.gdx.maps.tiled.tiles.AnimatedTiledMapTile
- All Implemented Interfaces:
- TiledMapTile
public class AnimatedTiledMapTile
- extends Object
- implements TiledMapTile
AnimatedTiledMapTile
public AnimatedTiledMapTile(float interval,
Array<StaticTiledMapTile> frameTiles)
- Creates an animated tile with the given animation interval and frame tiles.
- Parameters:
interval
- The interval between each individual frame tile.frameTiles
- An array of StaticTiledMapTile
s that make up the animation.
getId
public int getId()
- Specified by:
getId
in interface TiledMapTile
setId
public void setId(int id)
- Specified by:
setId
in interface TiledMapTile
getBlendMode
public TiledMapTile.BlendMode getBlendMode()
- Specified by:
getBlendMode
in interface TiledMapTile
- Returns:
- the
TiledMapTile.BlendMode
to use for rendering the tile
setBlendMode
public void setBlendMode(TiledMapTile.BlendMode blendMode)
- Description copied from interface:
TiledMapTile
- Sets the
TiledMapTile.BlendMode
to use for rendering the tile
- Specified by:
setBlendMode
in interface TiledMapTile
- Parameters:
blendMode
- the blend mode to use for rendering the tile
getTextureRegion
public TextureRegion getTextureRegion()
- Specified by:
getTextureRegion
in interface TiledMapTile
- Returns:
- texture region used to render the tile
getProperties
public MapProperties getProperties()
- Specified by:
getProperties
in interface TiledMapTile
- Returns:
- tile's properties set
updateAnimationBaseTime
public 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()
Copyright © 2014. All Rights Reserved.