Table of Contents

Class Skin

Namespace
PlumJsonAnimator.Models.SkeletonNameSpace
Assembly
PlumJsonAnimator.dll

Provides methods for work with skin

public class Skin : INotifyable, INotifyPropertyChanged
Inheritance
Skin
Implements
Inherited Members

Constructors

Skin(GlobalState)

public Skin(GlobalState globalState)

Parameters

globalState GlobalState

Skin(string, GlobalState)

public Skin(string name, GlobalState globalState)

Parameters

name string
globalState GlobalState

Fields

SlotAttachmentBinding

public Dictionary<Slot, Attachment?> SlotAttachmentBinding

Field Value

Dictionary<Slot, Attachment>

Properties

Name

public string Name { get; set; }

Property Value

string

Methods

AddSlot(Slot)

Adds slots to skin without binding

public void AddSlot(Slot s)

Parameters

s Slot

BindSlotAttachment(Slot, Attachment)

Binds slot and attachment in current skin

public void BindSlotAttachment(Slot s, Attachment a)

Parameters

s Slot

New slot

a Attachment

New attachment

ContainsRes(Res)

public bool ContainsRes(Res res)

Parameters

res Res

Returns

bool

ContainsSlot(Slot)

public bool ContainsSlot(Slot s)

Parameters

s Slot

Returns

bool

DeleteSlot(Slot)

public void DeleteSlot(Slot s)

Parameters

s Slot

DrawSkin(Canvas)

Draws skin

public void DrawSkin(Canvas canvas)

Parameters

canvas Canvas

GenerateCode()

public string GenerateCode()

Returns

string

GenerateJSONData()

public SkinData GenerateJSONData()

Returns

SkinData

GetAttachment(Slot)

public Attachment? GetAttachment(Slot s)

Parameters

s Slot

Returns

Attachment

GetImagePath(Slot)

Returns path to slot resource

public string GetImagePath(Slot s)

Parameters

s Slot

Target slot

Returns

string

GetSlots(Bone)

Returns all slots bounded with this bone

public List<Slot> GetSlots(Bone b)

Parameters

b Bone

Returns

List<Slot>

A list of slots

IsAttachUniq(string)

public bool IsAttachUniq(string name)

Parameters

name string

Returns

bool

IsSlotDrawable(Slot)

Checks whether the slot can be drawn

public bool IsSlotDrawable(Slot s)

Parameters

s Slot

Returns

bool

Returns true, if slot can be drawn

RemoveResIfContains(Res)

Tries to remove resource from skin

public void RemoveResIfContains(Res res)

Parameters

res Res

Target resource