Sprite Sheet (SpriteSheet
) derives from the Asset Data Structure, with the following additional fields:
RelativePath : string?
RenderedPath : string?
Width : double
Height : double
Sprites : Sprite[]
BitmapEffects : BitmapEffects?
Type : SpriteSheetType
AutoTerrain : AutoTerrain?
LevelId : string?
The first two fields (RelativePath
and RenderedPath
) are relative or absolute paths to the image files. RelativePath
points to the original file, and RenderedPath
optionally points to a rendered version of the sprite sheet with the bitmap effects.
Image files are either stored under the Assets
directory, or next to the world.json
file, or pointed to by a relative or absolute path.
The dimensions of the image file are stored in the Width
and Height
fields.
Optional bitmap effects are stored in the BitmapEffects
field, based on the Bitmap Effects Data Structure.
The type of the sprite sheet is stored in the Type
field. It is an enum defined as:
enum SpriteSheetType
{
Basic,
AutoTerrain,
Level
}
Regular sprite sheets have the Basic
type. They are simple image files on which Sprites are defined on. Sprites can be assigned to TileDefs which can be drawn on levels.
Sprite sheets can be automatically generated by the Auto Terrain feature. In that case, their type is AutoTerrain
, and the Auto Terrain data is stored in the Auto Terrain Data Structure.
Sprite sheets can also be dynamic renders of levels drawn in Ed. In such cases, their type is Level
and the LevelId
field will contain the GUID of that level.