Example #1
0
 public void FindNamesForSlot(int slotIndex, List <string> names)
 {
     if (names == null)
     {
         throw new ArgumentNullException("names", "names cannot be null.");
     }
     foreach (AttachmentKeyTuple key in attachments.Keys)
     {
         AttachmentKeyTuple current = key;
         if (current.slotIndex == slotIndex)
         {
             names.Add(current.name);
         }
     }
 }
Example #2
0
 public void FindAttachmentsForSlot(int slotIndex, List <Attachment> attachments)
 {
     if (attachments == null)
     {
         throw new ArgumentNullException("attachments", "attachments cannot be null.");
     }
     foreach (KeyValuePair <AttachmentKeyTuple, Attachment> attachment in this.attachments)
     {
         AttachmentKeyTuple key = attachment.Key;
         if (key.slotIndex == slotIndex)
         {
             attachments.Add(attachment.Value);
         }
     }
 }
Example #3
0
 internal void AttachAll(Skeleton skeleton, Skin oldSkin)
 {
     foreach (KeyValuePair <AttachmentKeyTuple, Attachment> attachment2 in oldSkin.attachments)
     {
         AttachmentKeyTuple key = attachment2.Key;
         int  slotIndex         = key.slotIndex;
         Slot slot = skeleton.slots.Items[slotIndex];
         if (slot.Attachment == attachment2.Value)
         {
             int slotIndex2                = slotIndex;
             AttachmentKeyTuple key2       = attachment2.Key;
             Attachment         attachment = GetAttachment(slotIndex2, key2.name);
             if (attachment != null)
             {
                 slot.Attachment = attachment;
             }
         }
     }
 }