Dart DocumentationstagexlSpriteSheet

SpriteSheet class

class SpriteSheet {
 int width;
 int height;
 BitmapData source;
 List<BitmapData> frames;

 SpriteSheet(this.source, this.width, this.height) {
   frames = source.sliceIntoFrames(width, height);
 }

 BitmapData frameAt(int index) {
   return frames[index];
 }
}

Constructors

new SpriteSheet(BitmapData source, int width, int height) #

Creates a new Object instance.

Object instances have no meaningful state, and are only useful through their identity. An Object instance is equal to itself only.

docs inherited from Object
SpriteSheet(this.source, this.width, this.height) {
 frames = source.sliceIntoFrames(width, height);
}

Properties

List<BitmapData> frames #

List<BitmapData> frames

int height #

int height

BitmapData source #

BitmapData source

int width #

int width

Methods

BitmapData frameAt(int index) #

BitmapData frameAt(int index) {
 return frames[index];
}