C# Класс ARCed.Helpers.Cache

Static class for loading graphic resources and caching them to increase performance. This class class also performs hue and opacity alterations on graphics.
Показать файл Открыть проект

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

Метод Описание
Animation ( string filename, int hue, int opacity = 255 ) : Image

Loads/recalls a cached animation file and returns it

Autotile ( string filename, int hue, int opacity = 255 ) : Image

Loads/recalls a cached image autotile file and returns it

Battleback ( string filename, int hue, int opacity = 255 ) : Image

Loads/recalls a cached battleback file and returns it

Battler ( string filename, int hue, int opacity = 255 ) : Image

Loads/recalls a cached image battler file and returns it

ChangeHueOpacity ( Image image, int hue, int opacity ) : void

Rotates the hue and alters the opacity of an image. Using this method is more efficient than performing the actions separately.

Values out of range will be automatically corrected

ChangeOpacity ( Image image, int opacity ) : void

Changes the opacity of an image.

Values out of range will be automatically corrected

Character ( string filename, int hue, int opacity = 255 ) : Image

Loads/recalls a cached character file and returns it

CharacterStance ( string filename, int pattern, int direction, int hue, int opacity = 255 ) : Image

Returns a tile of a character graphic using the given pattern and direction

Clear ( ) : void

Disposes all cached images and clears all keys and values of the dictionary

Fog ( string filename, int hue, int opacity = 255 ) : Image

Loads/recalls a cached fog file and returns it

Icon ( string filename, int hue, int opacity = 255 ) : Image

Loads/recalls a cached image icon file and returns it

LoadBitmap ( string folder, string filename ) : Image

Loads a filename as a Image from the specified folder, or recalls a cached image, and returns it.

Panorama ( string filename, int hue, int opacity = 255 ) : Image

Loads/recalls a cached panorama file and returns it

RotateHue ( Image image, int hue ) : void

Rotates the hue of an image

Values out of range will be automatically corrected

Tileset ( string filename, int hue, int opacity = 255 ) : Image

Loads/recalls a cached tileset file and returns it

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

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

Loads/recalls a cached animation file and returns it
public static Animation ( string filename, int hue, int opacity = 255 ) : Image
filename string Relative path of the animation graphic
hue int Hue rotation to apply to graphic, with 360 degrees of displacement
opacity int Opacity of the returned _srcTexture
Результат Image

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

Loads/recalls a cached image autotile file and returns it
public static Autotile ( string filename, int hue, int opacity = 255 ) : Image
filename string Full path of the autotile graphic
hue int Hue rotation to apply to graphic, with 360 degrees of displacement
opacity int Opacity of the returned _srcTexture
Результат Image

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

Loads/recalls a cached battleback file and returns it
public static Battleback ( string filename, int hue, int opacity = 255 ) : Image
filename string Full path of the battleback graphic
hue int Hue rotation to apply to graphic, with 360 degrees of displacement
opacity int Opacity of the returned image
Результат Image

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

Loads/recalls a cached image battler file and returns it
public static Battler ( string filename, int hue, int opacity = 255 ) : Image
filename string FullPath of the character graphic
hue int Hue rotation to apply to graphic, with 360 degrees of displacement
opacity int Opacity of the returned _srcTexture
Результат Image

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

Rotates the hue and alters the opacity of an image. Using this method is more efficient than performing the actions separately.
Values out of range will be automatically corrected
public static ChangeHueOpacity ( Image image, int hue, int opacity ) : void
image Image Image to change
hue int Degree of hue displacement (0..360)
opacity int Opacity change to apply (0..255)
Результат void

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

Changes the opacity of an image.
Values out of range will be automatically corrected
public static ChangeOpacity ( Image image, int opacity ) : void
image Image Image to change
opacity int Opacity change to apply (0..255)
Результат void

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

Loads/recalls a cached character file and returns it
public static Character ( string filename, int hue, int opacity = 255 ) : Image
filename string Full path of the character graphic
hue int Hue rotation to apply to graphic, with 360 degrees of displacement
opacity int Opacity of the returned _srcTexture
Результат Image

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

Returns a tile of a character graphic using the given pattern and direction
public static CharacterStance ( string filename, int pattern, int direction, int hue, int opacity = 255 ) : Image
filename string FullPath of the character graphic
pattern int Pattern of the character tile
direction int Direction of the character tile
hue int Hue rotation to apply to graphic, with 360 degrees of displacement
opacity int Opacity of the returned _srcTexture
Результат Image

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

Disposes all cached images and clears all keys and values of the dictionary
public static Clear ( ) : void
Результат void

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

Loads/recalls a cached fog file and returns it
public static Fog ( string filename, int hue, int opacity = 255 ) : Image
filename string Full path of the fog graphic
hue int Hue rotation to apply to graphic, with 360 degrees of displacement
opacity int Opacity of the returned _srcTexture
Результат Image

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

Loads/recalls a cached image icon file and returns it
public static Icon ( string filename, int hue, int opacity = 255 ) : Image
filename string Full path of the icon graphic
hue int Hue rotation to apply to graphic, with 360 degrees of displacement
opacity int Opacity of the returned _srcTexture
Результат Image

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

Loads a filename as a Image from the specified folder, or recalls a cached image, and returns it.
public static LoadBitmap ( string folder, string filename ) : Image
folder string Folder specifying where the image will be searched
filename string FullPath of the image, omitting extension
Результат Image

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

Loads/recalls a cached panorama file and returns it
public static Panorama ( string filename, int hue, int opacity = 255 ) : Image
filename string Full path of the panorama graphic
hue int Hue rotation to apply to graphic, with 360 degrees of displacement
opacity int Opacity of the returned _srcTexture
Результат Image

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

Rotates the hue of an image
Values out of range will be automatically corrected
public static RotateHue ( Image image, int hue ) : void
image Image Image to change
hue int Degree of hue displacement (0..360)
Результат void

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

Loads/recalls a cached tileset file and returns it
public static Tileset ( string filename, int hue, int opacity = 255 ) : Image
filename string Relative path of the tileset graphic
hue int Hue rotation to apply to graphic, with 360 degrees of displacement
opacity int Opacity of the returned _srcTexture
Результат Image