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.
SpriteSheet(this.source, this.width, this.height) {
frames = source.sliceIntoFrames(width, height);
}
Methods
BitmapData frameAt(int index) {
return frames[index];
}