mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
Merge pull request #198 from pharan/patch-1
Allow Skin.AddAttachment (C#) to overwrite safely
This commit is contained in:
commit
806d121e3d
@ -45,7 +45,7 @@ namespace Spine {
|
|||||||
|
|
||||||
public void AddAttachment (int slotIndex, String name, Attachment attachment) {
|
public void AddAttachment (int slotIndex, String name, Attachment attachment) {
|
||||||
if (attachment == null) throw new ArgumentNullException("attachment cannot be null.");
|
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>
|
/// <returns>May be null.</returns>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user