|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TiledSprite
Tiled sprite are mainly used for tile based levels. It works by loading an image, and split it into differents images.
Method Summary | |
---|---|
int |
getHorizontalTiles()
Get the number of horizontal tiles. |
java.awt.image.BufferedImage |
getTile(int tile)
Get a tile (store it on a new buffered image, no reference, can be slow !). |
int |
getTileHeight()
Get current tile height. |
int |
getTileOriginalHeight()
Get original tile height. |
int |
getTileOriginalWidth()
Get original tile width. |
java.awt.image.BufferedImage |
getTileReference(int tile)
Get a tile (as reference, faster). |
int |
getTilesNumber()
Get the number of tiles. |
int |
getTileWidth()
Get current tile width. |
int |
getVerticalTiles()
Get the number of vertical tiles. |
TiledSprite |
instanciate()
Get instancied version of current tiled sprite (shares the same surface). |
void |
render(java.awt.Graphics2D g,
int tile,
int x,
int y)
Render a tile to the specified coordinates. |
Methods inherited from interface com.b3dgs.lionengine.drawable.Sprite |
---|
filter, flipHorizontal, flipVertical, getHeightOriginal, getSurface, getWidthOriginal, load, rotate, scale, setAlpha, setTransparency, stretch |
Methods inherited from interface com.b3dgs.lionengine.drawable.Renderable |
---|
getHeight, getWidth, render |
Method Detail |
---|
void render(java.awt.Graphics2D g, int tile, int x, int y)
g
- graphic output.tile
- tile to render.x
- abscissa.y
- ordinate.int getHorizontalTiles()
int getVerticalTiles()
int getTilesNumber()
int getTileWidth()
int getTileHeight()
int getTileOriginalWidth()
int getTileOriginalHeight()
java.awt.image.BufferedImage getTile(int tile)
tile
- desired tile.
java.awt.image.BufferedImage getTileReference(int tile)
tile
- desired tile.
TiledSprite instanciate()
instanciate
in interface Image
instanciate
in interface Sprite
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |