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.
파일 보기 프로젝트 열기: borisblizzard/arcreator

공개 메소드들

메소드 설명
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