Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: Tileset

[13:7] extends: FxObj

Wraps FXGL's Tileset data class (com.almasb.fxgl.entity.level.tiled.Tileset), one tileset in a Tiled map. Stores the source image path, tile dimensions, margins, and the gid offset (firstgid) used by tile layers.

Methods

  • Tileset ()

    Empty default constructor; populated by adopt.

  • adopt (object Ajo)

    Wraps an existing Tileset AussomJavaObject.

  • getFirstgid ()

  • getImage ()

  • getName ()

  • getTilewidth ()

  • getTileheight ()

  • getImagewidth ()

  • getImageheight ()

  • getMargin ()

  • getSpacing ()

  • getColumns ()

  • getTilecount ()

  • getTransparentcolor ()

  • getTiles ()

    Returns the tiles list as an AJO.

  • isSpriteSheet ()

    Returns true if this tileset is a sprite sheet (columns > 0).

  • setFirstgid (int V)

  • setName (string V)

  • setTilewidth (int V)

  • setTileheight (int V)

  • setImagewidth (int V)

  • setImageheight (int V)

  • setMargin (int V)

  • setSpacing (int V)

  • setColumns (int V)

  • setTilecount (int V)

  • setTransparentcolor (string V)

  • setImage (string V)

    Sets the image string identifier (typically a relative URL).

  • setTiles (object ListAjo)

    Replaces the tiles list. Accepts a Java List AJO of Tile objects.