TileSheet

final case class TileSheet(assetName: AssetName, imageSize: Size, tileSize: Size, margin: Int)

Utility for working with generic sprite sheets. The sheet must be uniform, with each sprite having the same width and height, and a (possibly zero-pixel) inner margin.

Companion:
object
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

Value members

Concrete methods

def apply(index: Int): Option[Graphic[Bitmap]]
See also:

#fromIndex

def apply(column: Int, row: Int): Option[Graphic[Bitmap]]
See also:

#fromCoords

See also:

#fromPoint

def fromCoords(column: Int, row: Int): Option[Graphic[Bitmap]]
Value parameters:
column

zero-based

row

zero-based

Returns:

an optional Graphic, None if the given coordinates are out of bounds

Value parameters:
index

a zero-based index that begins at the upper right of the sheet and increases as it goes right and down

Returns:

an optional Graphic, None if the given index is out of bounds

Value parameters:
pt

zero-based x and y grid location of tile

Returns:

an optional Graphic, None if the given Point is out of bounds

Inherited methods

Inherited from:
Product

Concrete fields

val length: Int