mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 09:46:02 +08:00
Allow Skin.AddAttachment to overwrite safely
Allow Skin.AddAttachment to overwrite an existing attachment as intended. ( For more info, see the Remarks section of: http://msdn.microsoft.com/en-us/library/k7z0zy8k%28v=vs.110%29.aspx )
This commit is contained in:
parent
fa52abc780
commit
9e69a711b5
@ -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>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user