TileGraphicsBuilder

data class TileGraphicsBuilder(tileset: TilesetResource, size: Size, style: StyleSet, tiles: MutableMap<Position, Tile>, filler: Tile) : Builder<TileGraphics>

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

  • Default Size is ONE (1x1).

  • Default filler is an EMPTY character

Constructors

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

Types

Companion
Link copied to clipboard
common
object Companion

Functions

build
Link copied to clipboard
common
open override fun build(): TileGraphics
Builds a FastTileGraphics implementation.
buildPersistent
Link copied to clipboard
common
fun buildPersistent(): PersistentTileGraphics
Builds a PersistentTileGraphics implementation.
copy
Link copied to clipboard
common
fun copy(tileset: TilesetResource = RuntimeConfig.config.defaultTileset, size: Size = Size.one(), style: StyleSet = StyleSet.defaultStyle(), tiles: MutableMap<Position, Tile> = mutableMapOf(), filler: Tile = Tile.empty()): TileGraphicsBuilder
createCopy
Link copied to clipboard
common
open override fun createCopy(): TileGraphicsBuilder
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): TileGraphicsBuilder
Sets the filler for the new TileGraphics which will be used to fill the empty spaces.
withSize
Link copied to clipboard
common
fun withSize(size: Size): TileGraphicsBuilder
Sets the size for the new TileGraphics.
fun withSize(width: Int, height: Int): TileGraphicsBuilder
Sets the size for the new TileGraphics.
withTile
Link copied to clipboard
common
fun withTile(position: Position, tile: Tile): TileGraphicsBuilder
Adds a Tile at the given Position.
withTiles
Link copied to clipboard
common
fun withTiles(tiles: Map<Position, Tile>): TileGraphicsBuilder
Sets the given tiles to be used for the new TileGraphics.
withTileset
Link copied to clipboard
common
fun withTileset(tileset: TilesetResource): TileGraphicsBuilder

Sources

(source)
Link copied to clipboard