Package playn.core
Class Tile
java.lang.Object
playn.core.TileSource
playn.core.Tile
- Direct Known Subclasses:
Texture
Represents a square region of a texture. This makes it easy to render tiles from texture
atlases.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract void
addToBatch
(QuadBatch batch, int tint, AffineTransform tx, float x, float y, float width, float height) Adds this tile to the supplied quad batch.abstract void
addToBatch
(QuadBatch batch, int tint, AffineTransform tx, float dx, float dy, float dw, float dh, float sx, float sy, float sw, float sh) Adds this tile to the supplied quad batch.abstract float
height()
The height of this tile (in display units).boolean
isLoaded()
Returns whether this tile source is loaded and ready to provide its tile.abstract float
sx()
Returns thes
texture coordinate for the x-axis.abstract float
sy()
Returns thes
texture coordinate for the y-axis.abstract Texture
texture()
The texture which contains this tile.tile()
Returns the tile provided by this source.Delivers the tile provided by this source once the source is loaded.toString()
abstract float
tx()
Returns thet
texture coordinate for the x-axis.abstract float
ty()
Returns thet
texture coordinate for the y-axis.abstract float
width()
The width of this tile (in display units).
-
Constructor Details
-
Tile
public Tile()
-
-
Method Details
-
texture
The texture which contains this tile. -
width
public abstract float width()The width of this tile (in display units). -
height
public abstract float height()The height of this tile (in display units). -
sx
public abstract float sx()Returns thes
texture coordinate for the x-axis. -
sy
public abstract float sy()Returns thes
texture coordinate for the y-axis. -
tx
public abstract float tx()Returns thet
texture coordinate for the x-axis. -
ty
public abstract float ty()Returns thet
texture coordinate for the y-axis. -
addToBatch
public abstract void addToBatch(QuadBatch batch, int tint, AffineTransform tx, float x, float y, float width, float height) Adds this tile to the supplied quad batch. -
addToBatch
public abstract void addToBatch(QuadBatch batch, int tint, AffineTransform tx, float dx, float dy, float dw, float dh, float sx, float sy, float sw, float sh) Adds this tile to the supplied quad batch. -
isLoaded
public boolean isLoaded()Description copied from class:TileSource
Returns whether this tile source is loaded and ready to provide its tile.- Specified by:
isLoaded
in classTileSource
-
tile
Description copied from class:TileSource
Returns the tile provided by this source.- Specified by:
tile
in classTileSource
-
tileAsync
Description copied from class:TileSource
Delivers the tile provided by this source once the source is loaded.- Specified by:
tileAsync
in classTileSource
-
toString
-