public class AnimatedTileRenderer extends java.lang.Object implements TileRenderer
TileRenderer for animated tiles| Constructor and Description |
|---|
AnimatedTileRenderer(TilesetSource tilesetSource,
TileFrame[] frames) |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose() |
void |
draw(Graphics g,
int renderX,
int renderY)
Renders the
Tile at the given coordinates |
TextureRegion |
getCurrentTileImage()
Returns the current
Tile image |
void |
update(float delta)
Updates the
Tile frame |
public AnimatedTileRenderer(TilesetSource tilesetSource, TileFrame[] frames)
public void update(float delta)
TileRendererTile frameupdate in interface TileRendererdelta - The time since the last update in secondspublic void draw(Graphics g, int renderX, int renderY)
TileRendererTile at the given coordinatesdraw in interface TileRendererg - The Graphics context to userenderX - The x coordinate to render atrenderY - The y coordinate to render atpublic TextureRegion getCurrentTileImage()
TileRendererTile imagegetCurrentTileImage in interface TileRendererpublic void dispose()
dispose in interface com.badlogic.gdx.utils.Disposable