TileImageBuilder

data class TileImageBuilder(tileset: TilesetResource, filler: Tile, size: Size, tiles: MutableMap<Position, Tile>) : Builder<TileImage>

Creates org.hexworks.zircon.api.graphics.TileGraphicss. Defaults:

  • Default Size is ONE (1x1).

  • Default filler is an EMPTY character

Constructors

TileImageBuilder
Link copied to clipboard
common
fun TileImageBuilder(tileset: TilesetResource = RuntimeConfig.config.defaultTileset, filler: Tile = Tile.empty(), size: Size = Size.one(), tiles: MutableMap<Position, Tile> = mutableMapOf())

Types

Companion
Link copied to clipboard
common
object Companion

Functions

build
Link copied to clipboard
common
open override fun build(): TileImage
Builds an object of type T.
copy
Link copied to clipboard
common
fun copy(tileset: TilesetResource = RuntimeConfig.config.defaultTileset, filler: Tile = Tile.empty(), size: Size = Size.one(), tiles: MutableMap<Position, Tile> = mutableMapOf()): TileImageBuilder
createCopy
Link copied to clipboard
common
open override fun createCopy(): TileImageBuilder
Creates a deep copy of this object.
equals
Link copied to clipboard
common
open operator override fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
common
open override fun hashCode(): Int
toString
Link copied to clipboard
common
open override fun toString(): String
withFiller
Link copied to clipboard
common
fun withFiller(filler: Tile): TileImageBuilder
Sets the filler to be used when the TileImage is built.
withSize
Link copied to clipboard
common
fun withSize(size: Size): TileImageBuilder
Sets the size for the new TileImage.
withTile
Link copied to clipboard
common
fun withTile(position: Position, tile: Tile): TileImageBuilder
Adds a Tile at the given Position.
withTiles
Link copied to clipboard
common
fun withTiles(tiles: Map<Position, Tile>): TileImageBuilder
Sets the given tiles to be used for the new TileImage.
withTileset
Link copied to clipboard
common
fun withTileset(tileset: TilesetResource): TileImageBuilder
Sets the tileset to be used when building this TileImage.

Sources

(source)
Link copied to clipboard