public class OrthogonalTiledMapRenderer2 extends java.lang.Object implements TiledMapRenderer, Disposable
| Modifier and Type | Field and Description |
|---|---|
protected TiledMap |
map |
boolean |
recache |
protected SpriteCache |
spriteCache |
protected float |
unitScale |
protected Rectangle |
viewBounds |
| Constructor and Description |
|---|
OrthogonalTiledMapRenderer2(TiledMap map) |
OrthogonalTiledMapRenderer2(TiledMap map,
float unitScale) |
| Modifier and Type | Method and Description |
|---|---|
void |
begin() |
void |
dispose()
Releases all resources of this object.
|
void |
end() |
void |
render()
Renders all the layers of a map.
|
void |
render(int[] layers)
Renders the given layers of a map.
|
void |
renderObject(MapObject object) |
void |
renderTileLayer(TiledMapTileLayer layer) |
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.
|
protected TiledMap map
protected float unitScale
protected SpriteCache spriteCache
protected Rectangle viewBounds
public boolean recache
public OrthogonalTiledMapRenderer2(TiledMap map)
public OrthogonalTiledMapRenderer2(TiledMap map, float unitScale)
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 begin()
public void end()
public void render()
MapRendererrender in interface MapRendererpublic void render(int[] layers)
MapRendererrender in interface MapRendererpublic void renderObject(MapObject object)
renderObject in interface TiledMapRendererpublic void renderTileLayer(TiledMapTileLayer layer)
renderTileLayer in interface TiledMapRendererpublic void dispose()
Disposabledispose in interface Disposable