java.lang.Object
dev.aurumbyte.sypherengine.core.graphics.tiles.ImageTile

public class ImageTile extends Object
Getting specific Images from a tileset
Since:
v0.3.0
Author:
AurumByte
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (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

    Constructors
    Constructor
    Description
    ImageTile(String path, int tileWidth, int tileHeight)
    The abstract initialization method, to be overridden by the user
    ImageTile(javafx.scene.image.Image image, int tileWidth, int tileHeight)
    The abstract initialization method, to be overridden by the user
  • Method Summary

    Modifier and Type
    Method
    Description
    javafx.scene.image.Image
    getImageTile(int tileX, int tileY)
    The abstract initialization method, to be overridden by the user
    int
    Getting the height of the tile
    javafx.scene.image.Image
    returning the Tileset
    int
    Getting the width of the tile
    void
    setTileHeight(int tileHeight)
    Setting the height of the tile
    void
    setTileSet(javafx.scene.image.Image image)
    Setting the tileset
    void
    setTileWidth(int tileWidth)
    Setting the width of the tile

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • image

      javafx.scene.image.Image image
      The tileset image
    • tileWidth

      int tileWidth
      The width and height of a tile
    • tileHeight

      int tileHeight
      The 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 tileset
      tileWidth - The width of a tile
      tileHeight - The height of a tile
      Since:
      0.3.0
    • ImageTile

      public ImageTile(String path, int tileWidth, int tileHeight)

      The abstract initialization method, to be overridden by the user

      Parameters:
      path - The path to the tileset
      tileWidth - The width of a tile
      tileHeight - 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 width
      tileY - 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