TileMapData

data class TileMapData(val data: IStackedInt53Array2, val tileSet: TileSet = TileSet.EMPTY, val repeatX: TileMapRepeat = TileMapRepeat.NONE, val repeatY: TileMapRepeat = TileMapRepeat.NONE, val offsetScale: Float = 1.0f) : BaseDelegatedStackedArray2, IStackedArray2<Tile>

Constructors

Link copied to clipboard
constructor(data: IStackedInt53Array2, tileSet: TileSet = TileSet.EMPTY, repeatX: TileMapRepeat = TileMapRepeat.NONE, repeatY: TileMapRepeat = TileMapRepeat.NONE, offsetScale: Float = 1.0f)
constructor(width: Int, height: Int, tileSet: TileSet = TileSet.EMPTY, empty: Tile = Tile(0), repeatX: TileMapRepeat = TileMapRepeat.NONE, repeatY: TileMapRepeat = TileMapRepeat.NONE, offsetScale: Float = 1.0f)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val contentVersion: Int
Link copied to clipboard
Link copied to clipboard
val empty: Tile

The empty value that will be returned if the specified cell it out of bounds, or empty

Link copied to clipboard
open override val endX: Int
Link copied to clipboard
open override val endY: Int
Link copied to clipboard
open override val height: Int
Link copied to clipboard
open override val maxLevel: Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val startX: Int
Link copied to clipboard
open override val startY: Int
Link copied to clipboard
Link copied to clipboard
open override val width: Int

Functions

Link copied to clipboard
open override fun eachPosition(block: (x: Int, y: Int) -> Unit)
Link copied to clipboard
operator fun get(x: Int, y: Int): Tile
operator fun get(x: Int, y: Int, level: Int): Tile
Link copied to clipboard
fun TileMapData.get(p: PointInt, level: Int): Tile
Link copied to clipboard
fun getFirst(x: Int, y: Int): Tile

Gets the first value of the stack in the cell x, y

Link copied to clipboard
fun getLast(x: Int, y: Int): Tile

Gets the last value of the stack in the cell x, y

Link copied to clipboard
Link copied to clipboard
open override fun getStackLevel(x: Int, y: Int): Int

Number of values available at this x, y

Link copied to clipboard
Link copied to clipboard
open override fun inside(x: Int, y: Int): Boolean
open override fun inside(x: Int, y: Int, level: Int): Boolean
Link copied to clipboard
fun pop(x: Int, y: Int): Tile
Link copied to clipboard
Link copied to clipboard
fun push(x: Int, y: Int, value: Tile)

Adds a new value on top of x, y

Link copied to clipboard
fun TileMapData.push(p: PointInt, value: Tile)
Link copied to clipboard
open override fun removeAll(x: Int, y: Int): Boolean
Link copied to clipboard
Link copied to clipboard
open override fun removeAt(x: Int, y: Int, level: Int): Boolean
Link copied to clipboard
Link copied to clipboard
open override fun removeFirst(x: Int, y: Int): Boolean
Link copied to clipboard
Link copied to clipboard
open override fun removeLast(x: Int, y: Int): Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun TileMapData.renderTo(out: Bitmap, x: Int = 0, y: Int = 0)
Link copied to clipboard
operator fun set(x: Int, y: Int, data: Tile)
operator fun set(x: Int, y: Int, level: Int, data: Tile)
Link copied to clipboard
fun TileMapData.set(p: PointInt, level: Int, value: Tile)
Link copied to clipboard
fun setFirst(x: Int, y: Int, value: Tile)

Set the first value of a stack in the cell x, y

Link copied to clipboard
fun setLast(x: Int, y: Int, value: Tile)
Link copied to clipboard
Link copied to clipboard
open override fun setToFrom(x0: Int, y0: Int, level0: Int, x1: Int, y1: Int, level1: Int)
Link copied to clipboard