C# Class UWPalette, UnderworldExporter

Palette class for texture cycling effects. A cycled and default uncycled palette are stored.
Inheritance: UWEBase
Mostra file Open project: hankmorgan/UnderworldExporter Class Usage Examples

Public Methods

Method Description
ApplyPalette ( Texture2D SrcImage ) : Texture2D

Applies the cycled palette to a greyscale image

ApplyPaletteDefault ( Texture2D SrcImage ) : Texture2D

Applies the default palette to a greyscale image.

Private Methods

Method Description
Awake ( ) : void
CyclePalette ( int start, int end ) : void

Cycles the palette.

GetPal ( int index ) : Color

Gets the color at the specified index of the cycled palette.

GetPalDef ( int index ) : Color

Gets the color at the index of the default palette.

SetPal ( int index, float Red, float Green, float Blue ) : void

Sets the palette values

UpdateAnimation ( ) : void
UpdatePal ( int index, float Red, float Green, float Blue ) : void

Updates the palette values

Method Details

ApplyPalette() public method

Applies the cycled palette to a greyscale image
public ApplyPalette ( Texture2D SrcImage ) : Texture2D
SrcImage UnityEngine.Texture2D Source image.
return UnityEngine.Texture2D

ApplyPaletteDefault() public method

Applies the default palette to a greyscale image.
public ApplyPaletteDefault ( Texture2D SrcImage ) : Texture2D
SrcImage UnityEngine.Texture2D Source image.
return UnityEngine.Texture2D