SpriteSheet

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

A sprite sheet containing multiple sprites in a single image.

Attributes

spriteHeight

height of each sprite

spriteWidth

width of each sprite

surface

Surface with the sprite sheet

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Concise view

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.

Attributes

column

column of the sprite

line

line of the sprite

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.

Attributes

n

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

Returns:

surface view with the sprite

Concrete fields

How many sprites are stored on each line

How many sprites are stored on each line

Attributes