C# Class Sphere.Core.Tileset

A sphree Tileset object.
Inheritance: IDisposable
Afficher le fichier Open project: Radnen/spherestudio Class Usage Examples

Méthodes publiques

Méthode Description
CreateNew ( short tileWidth, short tileHeight ) : void

Adds a blank tile to the list of tiles.

Dispose ( ) : void

Disposes and clears this Tileset.

FromBinary ( BinaryReader reader ) : Tileset

Loads a tileset from a filestream.

FromFile ( string filename ) : Tileset

Loads a tileset independantly from a file.

FromSpriteset ( Spriteset set ) : Tileset

Takes the images of a spriteset and creates a ileset representation of it.

ResizeTiles ( short tw, short th, bool rescale ) : void

Resizes the tiles in the tileset.

Save ( string filename ) : void

Savbes the tileset to a separate file.

SaveImage ( string filename, int across = 6 ) : void

Saves the tileset as an image.

Tileset ( ) : System

Creates a fresh, empty tileset.

UpdateFromImage ( string filename ) : void

Updates graphics From a tileset image file.

Private Methods

Méthode Description
Dispose ( bool disposing ) : void

Method Details

CreateNew() public méthode

Adds a blank tile to the list of tiles.
public CreateNew ( short tileWidth, short tileHeight ) : void
tileWidth short The tile width in pixels.
tileHeight short The tile height in pixels.
Résultat void

Dispose() public méthode

Disposes and clears this Tileset.
public Dispose ( ) : void
Résultat void

FromBinary() public static méthode

Loads a tileset from a filestream.
public static FromBinary ( BinaryReader reader ) : Tileset
reader System.IO.BinaryReader The System.IO.BinrayReader to use.
Résultat Tileset

FromFile() public static méthode

Loads a tileset independantly from a file.
public static FromFile ( string filename ) : Tileset
filename string The filename to load from.
Résultat Tileset

FromSpriteset() public static méthode

Takes the images of a spriteset and creates a ileset representation of it.
public static FromSpriteset ( Spriteset set ) : Tileset
set Spriteset The spriteset to use.
Résultat Tileset

ResizeTiles() public méthode

Resizes the tiles in the tileset.
public ResizeTiles ( short tw, short th, bool rescale ) : void
tw short New tile width.
th short New tile height.
rescale bool If true rescale, else resize.
Résultat void

Save() public méthode

Savbes the tileset to a separate file.
public Save ( string filename ) : void
filename string The filename to save to.
Résultat void

SaveImage() public méthode

Saves the tileset as an image.
public SaveImage ( string filename, int across = 6 ) : void
filename string The filename to save to.
across int The amount of tiles to put across (width-wise).
Résultat void

Tileset() public méthode

Creates a fresh, empty tileset.
public Tileset ( ) : System
Résultat System

UpdateFromImage() public méthode

Updates graphics From a tileset image file.
public UpdateFromImage ( string filename ) : void
filename string
Résultat void