C# Класс Sphere.Core.Tileset

A sphree Tileset object.
Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
Dispose ( bool disposing ) : void

Описание методов

CreateNew() публичный Метод

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.
Результат void

Dispose() публичный Метод

Disposes and clears this Tileset.
public Dispose ( ) : void
Результат void

FromBinary() публичный статический Метод

Loads a tileset from a filestream.
public static FromBinary ( BinaryReader reader ) : Tileset
reader System.IO.BinaryReader The System.IO.BinrayReader to use.
Результат Tileset

FromFile() публичный статический Метод

Loads a tileset independantly from a file.
public static FromFile ( string filename ) : Tileset
filename string The filename to load from.
Результат Tileset

FromSpriteset() публичный статический Метод

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.
Результат Tileset

ResizeTiles() публичный Метод

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.
Результат void

Save() публичный Метод

Savbes the tileset to a separate file.
public Save ( string filename ) : void
filename string The filename to save to.
Результат void

SaveImage() публичный Метод

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).
Результат void

Tileset() публичный Метод

Creates a fresh, empty tileset.
public Tileset ( ) : System
Результат System

UpdateFromImage() публичный Метод

Updates graphics From a tileset image file.
public UpdateFromImage ( string filename ) : void
filename string
Результат void