SpriteSheet

eu.joaocosta.minart.graphics.image.SpriteSheet
final class SpriteSheet(surface: Surface, val spriteWidth: Int, val spriteHeight: Int)

A sprite sheet containing multiple sprites in a single image.

Value parameters

spriteHeight

height of each sprite

spriteWidth

width of each sprite

surface

Surface with the sprite sheet

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def getSprite(line: Int, column: Int): SurfaceView

Gets a sprite at a given position in the sheet.

Gets a sprite at a given position in the sheet.

Value parameters

column

column of the sprite

line

line of the sprite

Attributes

Returns

surface view with the sprite

def getSprite(n: Int): SurfaceView

Gets a sprite at the nth position in the sheet.

Gets a sprite at the nth position in the sheet.

Value parameters

n

position of the sprite (moves down a column when the end of a line is reached)

Attributes

Returns

surface view with the sprite

Concrete fields

val size: Int

How many sprites are stored

How many sprites are stored

Attributes

How many sprites are stored on each column

How many sprites are stored on each column

Attributes

How many sprites are stored on each line

How many sprites are stored on each line

Attributes