SpriteSheet

A SpriteSheet asset contains images to be used in a gadget, which can be displayed with the VideoChip and Screen, or printed as stickers to decorate the shell of the gadget. You can import PNG images as SpriteSheets in the Multitool or edit them in-game with the Sprite Editor.

To import a SpriteSheet from your computer, the image must be at most 256 x 64 pixels in size, with best results when using "PNG-8" or "Indexed PNG" modes.

Properties

Name string read only

The name of the asset.

Type string read only

String containing "SpriteSheet"

Palette Palette read only

Returns the palette used in the sprite sheet, which can be seen in the Sprite Editor. Currently, there's no code that can be used with this.

Methods

IsValid( ) boolean

Returns true if the asset reference is still valid.
References can become invalid if the asset is unloaded.

GetPixelData( ) PixelData

Returns a PixelData object containing the SpriteSheet data.

GetSpritePixelData( spriteX number, spriteY number ) PixelData

Returns a PixelData object containing the data of a specific sprite. The sprite is identified by spriteX and spriteY which represent its coordinate on the grid.