Class TilesetEntry

java.lang.Object
de.gurkenlabs.litiengine.environment.tilemap.xml.CustomPropertyProvider
de.gurkenlabs.litiengine.environment.tilemap.xml.TilesetEntry
All Implemented Interfaces:
ICustomPropertyProvider, ITilesetEntry

public class TilesetEntry extends CustomPropertyProvider implements ITilesetEntry
  • Constructor Details

    • TilesetEntry

      public TilesetEntry()
      Instantiates a new TilesetEntry.
    • TilesetEntry

      public TilesetEntry(Tileset tileset, int id)
      Instantiates a new TilesetEntry from the specified tileset.
      Parameters:
      tileset - The tileset that contains this entry.
      id - The identifier of this instance.
    • TilesetEntry

      public TilesetEntry(Tileset tileset, TilesetEntry original)
  • Method Details

    • getId

      public int getId()
      Specified by:
      getId in interface ITilesetEntry
    • getAnimation

      public ITileAnimation getAnimation()
      Specified by:
      getAnimation in interface ITilesetEntry
    • getImage

      public BufferedImage getImage()
      Description copied from interface: ITilesetEntry
      Gets the current image for this tileset entry.
      Specified by:
      getImage in interface ITilesetEntry
      Returns:
      The current image for this tileset entry, accounting for animation.
    • getBasicImage

      public BufferedImage getBasicImage()
      Description copied from interface: ITilesetEntry
      Gets the "standard" image for this tileset entry, without applying any animations.
      Specified by:
      getBasicImage in interface ITilesetEntry
      Returns:
      The standard image for this tileset entry
    • getTileset

      public ITileset getTileset()
      Description copied from interface: ITilesetEntry
      Gets the tileset that this entry belongs to.
      Specified by:
      getTileset in interface ITilesetEntry
      Returns:
      The tileset for this entry
    • getType

      public String getType()
      Specified by:
      getType in interface ITilesetEntry
    • setType

      public void setType(String type)
    • getProbability

      public double getProbability()
    • setProbability

      public void setProbability(double probability)
    • setAnimation

      public void setAnimation(TileAnimation animation)
    • getCollisionInfo

      public IMapObjectLayer getCollisionInfo()
      Specified by:
      getCollisionInfo in interface ITilesetEntry
    • getOrCreateCollisionInfo

      public MapObjectLayer getOrCreateCollisionInfo()
      Gets the collision layer for this tile, creating it if necessary.
      Returns:
      the collision layer
    • clearCollisionInfo

      public void clearCollisionInfo()
      Removes all collision information from this tile.