LayerBuilder

data class LayerBuilder(tileset: TilesetResource, size: Size, offset: Position, tileGraphics: Maybe<TileGraphics>, filler: Tile) : Builder<Layer>

Use this to build Layers. Defaults are:

Constructors

LayerBuilder
Link copied to clipboard
common
fun LayerBuilder(tileset: TilesetResource = RuntimeConfig.config.defaultTileset, size: Size = Size.defaultGridSize(), offset: Position = Position.defaultPosition(), tileGraphics: Maybe<TileGraphics> = Maybe.empty(), filler: Tile = Tile.empty())

Types

Companion
Link copied to clipboard
common
object Companion

Functions

build
Link copied to clipboard
common
open override fun build(): Layer
Builds an object of type T.
copy
Link copied to clipboard
common
fun copy(tileset: TilesetResource = RuntimeConfig.config.defaultTileset, size: Size = Size.defaultGridSize(), offset: Position = Position.defaultPosition(), tileGraphics: Maybe<TileGraphics> = Maybe.empty(), filler: Tile = Tile.empty()): LayerBuilder
createCopy
Link copied to clipboard
common
open override fun createCopy(): LayerBuilder
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): LayerBuilder
Sets the filler for the new TileGraphics which will be used to fill the empty spaces.
withOffset
Link copied to clipboard
common
fun withOffset(offset: Position): LayerBuilder
Sets the offset for the new org.hexworks.zircon.api.graphics.Layer.
fun withOffset(x: Int, y: Int): LayerBuilder
Sets the offset for the new org.hexworks.zircon.api.graphics.Layer.
withSize
Link copied to clipboard
common
fun withSize(size: Size): LayerBuilder
Sets the size for the new org.hexworks.zircon.api.graphics.Layer.
fun withSize(width: Int, height: Int): LayerBuilder
Sets the size for the new org.hexworks.zircon.api.graphics.Layer.
withTileGraphics
Link copied to clipboard
common
fun withTileGraphics(tileGraphics: TileGraphics): LayerBuilder
Uses the given TileGraphics and converts it to a Layer.
withTileset
Link copied to clipboard
common
fun withTileset(tileset: TilesetResource): LayerBuilder
Sets the Tileset to use with the resulting Layer.

Sources

(source)
Link copied to clipboard