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
globalStateGlobalState
Skin(string, GlobalState)
public Skin(string name, GlobalState globalState)
Parameters
namestringglobalStateGlobalState
Fields
SlotAttachmentBinding
public Dictionary<Slot, Attachment?> SlotAttachmentBinding
Field Value
Properties
Name
public string Name { get; set; }
Property Value
Methods
AddSlot(Slot)
Adds slots to skin without binding
public void AddSlot(Slot s)
Parameters
sSlot
BindSlotAttachment(Slot, Attachment)
Binds slot and attachment in current skin
public void BindSlotAttachment(Slot s, Attachment a)
Parameters
sSlotNew slot
aAttachmentNew attachment
ContainsRes(Res)
public bool ContainsRes(Res res)
Parameters
resRes
Returns
ContainsSlot(Slot)
public bool ContainsSlot(Slot s)
Parameters
sSlot
Returns
DeleteSlot(Slot)
public void DeleteSlot(Slot s)
Parameters
sSlot
DrawSkin(Canvas)
Draws skin
public void DrawSkin(Canvas canvas)
Parameters
canvasCanvas
GenerateCode()
public string GenerateCode()
Returns
GenerateJSONData()
public SkinData GenerateJSONData()
Returns
GetAttachment(Slot)
public Attachment? GetAttachment(Slot s)
Parameters
sSlot
Returns
GetImagePath(Slot)
Returns path to slot resource
public string GetImagePath(Slot s)
Parameters
sSlotTarget slot
Returns
GetSlots(Bone)
Returns all slots bounded with this bone
public List<Slot> GetSlots(Bone b)
Parameters
bBone
Returns
IsAttachUniq(string)
public bool IsAttachUniq(string name)
Parameters
namestring
Returns
IsSlotDrawable(Slot)
Checks whether the slot can be drawn
public bool IsSlotDrawable(Slot s)
Parameters
sSlot
Returns
- bool
Returns true, if slot can be drawn
RemoveResIfContains(Res)
Tries to remove resource from skin
public void RemoveResIfContains(Res res)
Parameters
resResTarget resource