java.lang.Object
dev.aurumbyte.sypherengine.core.graphics.tiles.ImageTile
Getting specific Images from a tileset
- Since:
- v0.3.0
- Author:
- AurumByte
-
Field Summary
Modifier and TypeFieldDescription(package private) javafx.scene.image.Image
The tileset image(package private) int
The width and height of a tile(package private) int
The width and height of a tile -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionjavafx.scene.image.Image
getImageTile
(int tileX, int tileY) The abstract initialization method, to be overridden by the userint
Getting the height of the tilejavafx.scene.image.Image
returning the Tilesetint
Getting the width of the tilevoid
setTileHeight
(int tileHeight) Setting the height of the tilevoid
setTileSet
(javafx.scene.image.Image image) Setting the tilesetvoid
setTileWidth
(int tileWidth) Setting the width of the tile
-
Field Details
-
image
javafx.scene.image.Image imageThe tileset image -
tileWidth
int tileWidthThe width and height of a tile -
tileHeight
int tileHeightThe width and height of a tile
-
-
Constructor Details
-
ImageTile
public ImageTile(javafx.scene.image.Image image, int tileWidth, int tileHeight) The abstract initialization method, to be overridden by the user
- Parameters:
image
- The tilesettileWidth
- The width of a tiletileHeight
- The height of a tile- Since:
- 0.3.0
-
ImageTile
The abstract initialization method, to be overridden by the user
- Parameters:
path
- The path to the tilesettileWidth
- The width of a tiletileHeight
- The height of a tile- Since:
- 0.3.0
-
-
Method Details
-
getImageTile
public javafx.scene.image.Image getImageTile(int tileX, int tileY) The abstract initialization method, to be overridden by the user
- Parameters:
tileX
- The tile count from left to right as per specified tile widthtileY
- The tile count from top to bottom as per specified tile height- Since:
- 0.3.0
-
getTileSet
public javafx.scene.image.Image getTileSet()returning the Tileset
- Since:
- 0.3.0
-
getTileHeight
public int getTileHeight()Getting the height of the tile
- Since:
- 0.3.0
-
getTileWidth
public int getTileWidth()Getting the width of the tile
- Since:
- 0.3.0
-
setTileSet
public void setTileSet(javafx.scene.image.Image image) Setting the tileset
- Parameters:
image
- the tileset image- Since:
- 0.3.0
-
setTileHeight
public void setTileHeight(int tileHeight) Setting the height of the tile
- Parameters:
tileHeight
- the height of the tile to be set- Since:
- 0.3.0
-
setTileWidth
public void setTileWidth(int tileWidth) Setting the width of the tile
- Parameters:
tileWidth
- the width of the tile to be set- Since:
- 0.3.0
-