-
Notifications
You must be signed in to change notification settings - Fork 31
Tile
Represents a tile on a Layer
const ldtk::Layer* const ldtk::Tile::layerPointer to the Layer object that contains the Tile.
const int ldtk::Tile::coordIdCoordinate ID of the Tile. Used to retrieve grid position of the Tile.
const int ldtk::Tile::tileIdUnique ID that identifies the Tile on its Tileset.
const bool ldtk::Tile::flipXEquals true if the Tile is flipped alongside the X axis. Equals false otherwise.
const bool ldtk::Tile::flipYEquals true if the Tile is flipped alongside the Y axis. Equals false otherwise.
const float ldtk::Tile::alphaA value between 0.0 and 1.0 that represnets the opacity of the Tile.
ldtk::Tile::getPosition() const -> ldtk::IntPointReturns the position of the Tile in pixels, relatively to the Level (i.e. after applying Layer offset).
ldtk::Tile::getGridPosition() const -> ldtk::IntPointReturns the grid position of the Tile.
ldtk::Tile::getWorldPosition() const -> ldtk::IntPointReturns the position of the Tile in pixels, relatively to the World (i.e. after applying Layer and Level offsets).
ldtk::Tile::getTextureRect() const -> ldtk::IntRectReturns the IntRect corresponding to the Tile area on the Tileset texture.
ldtk::Tile::getVertices() const -> std::array<ldtk::Vertex, 4>Returns an array containing 4 vertices, corresponding the graphical representation of a Tile quad.
See Vertex.