Class Skinable
- Namespace
- CustomKnight
- Assembly
- CustomKnight.dll
The abstract Class that represents a single Skinable resource in the game. These can be used to add support for custom objects to be skinned as if they were defined within Custom Knight
public abstract class Skinable
- Inheritance
-
Skinable
- Derived
- Inherited Members
Constructors
Skinable(string)
Ctor
public Skinable(string name)
Parameters
name
stringName of the skinable
Fields
name
The name of the Skinable resource, is used as an identifier and the file expected is name.png.
public string name
Field Value
Properties
ckTex
A CustomKnightTexture that holds the state of the skin for this skinable.
public CustomKnightTexture ckTex { get; set; }
Property Value
Methods
Apply()
Wrapper Method for ApplyTexture, used for logging.
public void Apply()
ApplyTexture(Texture2D)
A Method that is called to Apply a Texture to the current Skinable.
public abstract void ApplyTexture(Texture2D tex)
Parameters
tex
Texture2DA
Texture2D
that is to be applied
DumpDefaultTexture()
Method that Dumps the Default Texture to the disk
public void DumpDefaultTexture()
Prepare()
A Method that is called to so that any preparations for the Skinable can be done. for example, saving the material that will be used.
public virtual void Prepare()
Reset()
Wrapper Method for ApplyTexture, used for Resetting the skin to default texture.
public virtual void Reset()
SaveDefaultTexture()
A Method that is called to create a backup of the default texture of the skinable, used when unloading or as a fallback. this must save the defaultTexture in ckTex for seamless integration.
public abstract void SaveDefaultTexture()
SaveTexture()
Wrapper Method for SaveDefaultTexture, used for logging.
public void SaveTexture()