|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object hermes.animation.Tileset
public class Tileset
Constructor Summary | |
---|---|
Tileset(PImage tileImage,
int tileWidth,
int tileHeight)
|
Method Summary | |
---|---|
int |
getNumberOfCols()
|
int |
getNumberOfRows()
|
PImage[] |
getRowOfTiles(int row)
Get a row of PImages from the Tileset Note: You might find this handy for building an Animation for an AnimatedSprite |
PImage |
getTile(int row,
int col)
Get a single tile from the Tilemap |
int |
getTileHeight()
Get the height of each tile |
int |
getTileWidth()
Get the width of each tile |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Tileset(PImage tileImage, int tileWidth, int tileHeight)
tileImage
- PImage of tileset to cut uptileWidth
- width of tiles in the set, in pixelstileHeight
- height of tiles in the set, in pixelsMethod Detail |
---|
public PImage getTile(int row, int col)
row
- row that the tile is incol
- col that the tile is in
public int getTileWidth()
public int getTileHeight()
public int getNumberOfCols()
public int getNumberOfRows()
public PImage[] getRowOfTiles(int row)
row
- the index of the row to be returned
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |