Table of Contents

Class SkinManager

Namespace
CustomKnight
Assembly
CustomKnight.dll

Allows Managing the Skins

public static class SkinManager
Inheritance
SkinManager
Inherited Members

Fields

Skinables

Dictionary that holds all Skinable items

public static Dictionary<string, Skinable> Skinables

Field Value

Dictionary<string, Skinable>

Properties

DATA_DIR

Name of the Data directory

public static string DATA_DIR { get; }

Property Value

string

Methods

AddSkin(ISelectableSkin)

Add a skin to the skin list provided by an external mod.

public static bool AddSkin(ISelectableSkin NewSkin)

Parameters

NewSkin ISelectableSkin

an ISelectableSkin that represents the skin

Returns

bool

true if the skin is added

GetCurrentSkin()

Gets the current skin.

public static ISelectableSkin GetCurrentSkin()

Returns

ISelectableSkin

an ISelectableSkin that represents the current skin

GetDefaultSkin()

Gets the default skin.

public static ISelectableSkin GetDefaultSkin()

Returns

ISelectableSkin

an ISelectableSkin that represents the default skin

GetInstalledSkins()

Gets all the installed skins (includes mod provided skins).

public static ISelectableSkin[] GetInstalledSkins()

Returns

ISelectableSkin[]

an ISelectableSkin[] that represents all the installed skins

GetSkinById(string)

Gets a skin from the overall skin list that matches a given id.

public static ISelectableSkin GetSkinById(string id)

Parameters

id string

a string that uniquely identifies the skin

Returns

ISelectableSkin

an ISelectableSkin that represents the skin or the default skin

RefreshSkin(bool)

Refreshes the current skin, useful when the provided skin needs to change.

public static void RefreshSkin(bool skipFlash)

Parameters

skipFlash bool

a bool that determines if the knight should flash white

SetSkinById(string)

Change the current skin, to the one whose id is provided.

public static void SetSkinById(string id)

Parameters

id string

a string that uniquely identifies the skin

SkinExistsById(string)

Checks if a skin from the overall skin list exists that matches a given id.

public static bool SkinExistsById(string id)

Parameters

id string

Returns

bool

true if exists

Events

OnSetSkin

Event raised when a skin is set

public static event EventHandler<EventArgs> OnSetSkin

Event Type

EventHandler<EventArgs>