| Constructor and Description |
|---|
DerivedSprite(Sprite s,
int x,
int y,
int width,
int height) |
| Modifier and Type | Method and Description |
|---|---|
void |
drawTile(Graphics2D g,
int x,
int y,
int width,
int height)
Draws a tile of this sprite.
|
int |
getColumns()
Get the number of columns.
|
int |
getRows()
Get the number of rows.
|
Sprite |
getSubSprite(int x,
int y,
int width,
int height)
Get sub-sprite with given dimension.
|
BufferedImage |
getTile(int x,
int y)
Get a tile of this sprite.
|
int |
getTileCount()
Get the number of tiles in this sprite.
|
int |
getTileHeight()
Get the height of one tile
|
int |
getTileWidth()
Get the width of one tile
|
public DerivedSprite(Sprite s, int x, int y, int width, int height)
public void drawTile(Graphics2D g, int x, int y, int width, int height)
Bounds(0, 0,
width, height).public BufferedImage getTile(int x, int y)
SpriteSprite.drawTile(Graphics2D, int, int, int, int) for faster action and less memory
usage.getTile in interface Spritex - X-Coordinate of the tiley - Y-Coordinate of the tileBufferedImage containing the tilepublic int getTileCount()
getTileCount in interface Spritepublic int getColumns()
getColumns in interface Spritepublic int getTileWidth()
getTileWidth in interface Spritepublic int getTileHeight()
getTileHeight in interface Spritepublic Sprite getSubSprite(int x, int y, int width, int height)
SpriteDerivedSprite is linked with this
sprite.getSubSprite in interface Spritex - X-Coordinate of first tiley - Y-Coordinate of first tilewidth - Width of the sub-spriteheight - Height of the sub-spriteDerivedSpriteCopyright © 2017. All rights reserved.