浏览代码

Merge pull request #198 from pharan/patch-1

Allow Skin.AddAttachment (C#) to overwrite safely
Nathan Sweet 11 年之前
父节点
当前提交
806d121e3d
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      spine-csharp/src/Skin.cs

+ 1 - 1
spine-csharp/src/Skin.cs

@@ -45,7 +45,7 @@ namespace Spine {
 
 		public void AddAttachment (int slotIndex, String name, Attachment attachment) {
 			if (attachment == null) throw new ArgumentNullException("attachment cannot be null.");
-			attachments.Add(new KeyValuePair<int, String>(slotIndex, name), attachment);
+			attachments[new KeyValuePair<int, String>(slotIndex, name)] = attachment;
 		}
 
 		/// <returns>May be null.</returns>