public class TileMapLayer extends java.lang.Object implements Renderable
Modifier and Type | Field and Description |
---|---|
private java.lang.Integer |
id |
private java.lang.Integer |
importance |
private java.lang.String |
name |
private static int |
nextId |
private Tile[][] |
tiles |
Constructor and Description |
---|
TileMapLayer() |
TileMapLayer(java.lang.Integer importance,
java.lang.String name) |
TileMapLayer(java.lang.Integer importance,
java.lang.String name,
Tile[][] tiles) |
TileMapLayer(Tile[][] tiles) |
Modifier and Type | Method and Description |
---|---|
void |
addTile(Tile tile,
int x,
int y) |
private void |
ensureTilesSize(int x,
int y) |
java.lang.Integer |
getId() |
java.lang.Integer |
getImportance() |
java.lang.String |
getName() |
Tile[][] |
getTiles() |
void |
render(org.newdawn.slick.GameContainer gc,
org.newdawn.slick.Graphics g) |
void |
setImportance(java.lang.Integer importance) |
void |
setName(java.lang.String name) |
void |
setTiles(Tile[][] tiles) |
void |
update(org.newdawn.slick.GameContainer gc,
int d) |
private static int nextId
private java.lang.Integer id
private java.lang.Integer importance
private java.lang.String name
private Tile[][] tiles
public TileMapLayer()
public TileMapLayer(java.lang.Integer importance, java.lang.String name)
public TileMapLayer(Tile[][] tiles)
public TileMapLayer(java.lang.Integer importance, java.lang.String name, Tile[][] tiles)
public void addTile(Tile tile, int x, int y)
private void ensureTilesSize(int x, int y)
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
public java.lang.Integer getId()
public java.lang.Integer getImportance()
public void setImportance(java.lang.Integer importance)
importance
- the importance to setpublic java.lang.String getName()
public void setName(java.lang.String name)
name
- the name to setpublic Tile[][] getTiles()
public void setTiles(Tile[][] tiles)
tiles
- the tiles to set