public class TileMap extends java.lang.Object implements Renderable
Modifier and Type | Field and Description |
---|---|
private java.util.List<TileMapLayer> |
layers |
Constructor and Description |
---|
TileMap() |
TileMap(java.util.List<TileMapLayer> layers) |
Modifier and Type | Method and Description |
---|---|
void |
addLayer(TileMapLayer layer) |
void |
fillBackgroundLayer(TileSprite bgTile,
int width,
int height)
Fills a background layer with a specified sprite and sets it a low importance
|
TileMapLayer[] |
getLayersOrderedByImportance() |
void |
render(org.newdawn.slick.GameContainer gc,
org.newdawn.slick.Graphics g) |
void |
update(org.newdawn.slick.GameContainer gc,
int d) |
private java.util.List<TileMapLayer> layers
public TileMap()
public TileMap(java.util.List<TileMapLayer> layers)
tiles
- pre-fills the tiles of the TileMappublic void addLayer(TileMapLayer layer)
layer
- the layer to add to the mappublic void fillBackgroundLayer(TileSprite bgTile, int width, int height)
bgTile
- width
- height
- public TileMapLayer[] getLayersOrderedByImportance()
public void render(org.newdawn.slick.GameContainer gc, org.newdawn.slick.Graphics g) throws org.newdawn.slick.SlickException
render
in interface Renderable
org.newdawn.slick.SlickException
public void update(org.newdawn.slick.GameContainer gc, int d) throws org.newdawn.slick.SlickException
update
in interface Renderable
org.newdawn.slick.SlickException