public class StaticTileRenderer extends java.lang.Object implements TileRenderer
TileRenderer for single tile images| Constructor and Description |
|---|
StaticTileRenderer(TilesetSource tilesetSource,
Tile tile) |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose() |
void |
draw(org.mini2Dx.core.Graphics g,
int renderX,
int renderY,
float alpha)
Renders the
Tile at the given coordinates |
void |
draw(org.mini2Dx.core.Graphics g,
int renderX,
int renderY,
float alpha,
boolean flipH,
boolean flipV,
boolean flipD)
Renders the
Tile at the given coordinates |
static void |
drawTileImage(org.mini2Dx.core.Graphics g,
org.mini2Dx.core.graphics.Sprite tileImage,
int renderX,
int renderY,
float alpha,
boolean flipH,
boolean flipV,
boolean flipD) |
org.mini2Dx.core.graphics.Sprite |
getCurrentTileImage()
Returns the current
Tile image |
void |
update(float delta)
Updates the
Tile frame |
public StaticTileRenderer(TilesetSource tilesetSource, Tile tile)
public void update(float delta)
TileRendererTile frameupdate in interface TileRendererdelta - The time since the last update in secondspublic void draw(org.mini2Dx.core.Graphics g,
int renderX,
int renderY,
float alpha)
TileRendererTile at the given coordinatesdraw in interface TileRendererg - The Graphics context to userenderX - The x coordinate to render atrenderY - The y coordinate to render atalpha - The alpha value to render withpublic void draw(org.mini2Dx.core.Graphics g,
int renderX,
int renderY,
float alpha,
boolean flipH,
boolean flipV,
boolean flipD)
TileRendererTile at the given coordinatesdraw in interface TileRendererg - The Graphics context to userenderX - The x coordinate to render atrenderY - The y coordinate to render atalpha - The alpha value to render withflipH - True if the tile is flipped horizontallyflipV - True if the tile is flipped verticallyflipD - True if the tile is flipped (anti) diagonally - rotationpublic org.mini2Dx.core.graphics.Sprite getCurrentTileImage()
TileRendererTile imagegetCurrentTileImage in interface TileRendererpublic void dispose()
dispose in interface org.mini2Dx.gdx.utils.Disposablepublic static void drawTileImage(org.mini2Dx.core.Graphics g,
org.mini2Dx.core.graphics.Sprite tileImage,
int renderX,
int renderY,
float alpha,
boolean flipH,
boolean flipV,
boolean flipD)