public abstract class BatchTiledMapRenderer extends java.lang.Object implements TiledMapRenderer, Disposable
| Modifier and Type | Field and Description |
|---|---|
protected TiledMap |
map |
protected SpriteBatch |
spriteBatch |
protected float |
unitScale |
protected Rectangle |
viewBounds |
| Constructor and Description |
|---|
BatchTiledMapRenderer(TiledMap map) |
BatchTiledMapRenderer(TiledMap map,
float unitScale) |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose()
Releases all resources of this object.
|
TiledMap |
getMap() |
SpriteBatch |
getSpriteBatch() |
float |
getUnitScale() |
Rectangle |
getViewBounds() |
void |
render()
Renders all the layers of a map.
|
void |
render(int[] layers)
Renders the given layers of a map.
|
void |
setView(Matrix4 projection,
float x,
float y,
float width,
float height)
Sets the projection matrix for rendering, as well as the bounds of the map
which should be rendered.
|
void |
setView(OrthographicCamera camera)
Sets the projection matrix and viewbounds from the given camera.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitrenderObject, renderTileLayerprotected TiledMap map
protected float unitScale
protected SpriteBatch spriteBatch
protected Rectangle viewBounds
public BatchTiledMapRenderer(TiledMap map)
public BatchTiledMapRenderer(TiledMap map, float unitScale)
public TiledMap getMap()
public float getUnitScale()
public SpriteBatch getSpriteBatch()
public Rectangle getViewBounds()
public void setView(OrthographicCamera camera)
MapRenderersetView in interface MapRenderercamera - the OrthographicCamerapublic void setView(Matrix4 projection, float x, float y, float width, float height)
MapRenderersetView in interface MapRendererpublic void render()
MapRendererrender in interface MapRendererpublic void render(int[] layers)
MapRendererrender in interface MapRendererpublic void dispose()
Disposabledispose in interface Disposable