public class TileSpriteSheet
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private org.newdawn.slick.Image |
fullImage |
private java.lang.String |
path |
private org.newdawn.slick.Image[][] |
tileImages |
private int |
tileSize |
Constructor and Description |
---|
TileSpriteSheet(java.lang.String path) |
TileSpriteSheet(java.lang.String path,
int tileSize) |
Modifier and Type | Method and Description |
---|---|
org.newdawn.slick.Image |
getFullImage() |
int |
getHeight() |
java.lang.String |
getPath() |
int |
getTileHeight() |
org.newdawn.slick.Image |
getTileImage(int x,
int y) |
org.newdawn.slick.Image[][] |
getTiles() |
TileSprite |
getTileSprite(int x,
int y) |
int |
getTileWidth() |
int |
getWidth() |
private java.lang.String path
private int tileSize
private org.newdawn.slick.Image[][] tileImages
private org.newdawn.slick.Image fullImage
public TileSpriteSheet(java.lang.String path)
path
- path to the image
This constructor does not create array of tilespublic TileSpriteSheet(java.lang.String path, int tileSize)
path
- the path to the sprite sheetsize
- the size of the sprite sheet, the sprite sheet must have an equal height and widthpublic org.newdawn.slick.Image[][] getTiles()
public int getTileWidth()
public int getTileHeight()
public int getWidth()
public int getHeight()
public org.newdawn.slick.Image getTileImage(int x, int y)
public TileSprite getTileSprite(int x, int y)
public java.lang.String getPath()
public org.newdawn.slick.Image getFullImage()