Package playn.core

Class TileSource

java.lang.Object
playn.core.TileSource
Direct Known Subclasses:
Image, Image.Region, Tile

public abstract class TileSource extends Object
Provides a Tile, potentially asynchronously. This provides a uniform API for obtaining a Texture or Tile directly from an instance thereof, or from an Image which provides the Texture or an Image.Region (TODO) which provides the Tile.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract boolean
    Returns whether this tile source is loaded and ready to provide its tile.
    abstract Tile
    Returns the tile provided by this source.
    abstract RFuture<Tile>
    Delivers the tile provided by this source once the source is loaded.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TileSource

      public TileSource()
  • Method Details

    • isLoaded

      public abstract boolean isLoaded()
      Returns whether this tile source is loaded and ready to provide its tile.
    • tile

      public abstract Tile tile()
      Returns the tile provided by this source.
      Throws:
      IllegalStateException - if !isLoaded().
    • tileAsync

      public abstract RFuture<Tile> tileAsync()
      Delivers the tile provided by this source once the source is loaded.