com.badlogic.gdx.maps.tiled.tiles
Class AnimatedTiledMapTile

java.lang.Object
  extended by com.badlogic.gdx.maps.tiled.tiles.AnimatedTiledMapTile
All Implemented Interfaces:
TiledMapTile

public class AnimatedTiledMapTile
extends Object
implements TiledMapTile


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.badlogic.gdx.maps.tiled.TiledMapTile
TiledMapTile.BlendMode
 
Constructor Summary
AnimatedTiledMapTile(float interval, Array<StaticTiledMapTile> frameTiles)
           
 
Method Summary
 TiledMapTile.BlendMode getBlendMode()
           
 int getId()
           
 MapProperties getProperties()
           
 TextureRegion getTextureRegion()
           
 void setBlendMode(TiledMapTile.BlendMode blendMode)
          Sets the TiledMapTile.BlendMode to use for rendering the tile
 void setId(int id)
           
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()
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnimatedTiledMapTile

public AnimatedTiledMapTile(float interval,
                            Array<StaticTiledMapTile> frameTiles)
Method Detail

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 © 2013. All Rights Reserved.