mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-20 09:16:01 +08:00
[cpp] Added Skin::removeAttachment.
This commit is contained in:
parent
3f412f1f4d
commit
3e84da4d63
@ -119,6 +119,9 @@ public:
|
||||
/// If the name already exists for the slot, the previous value is replaced.
|
||||
void addAttachment(size_t slotIndex, const String &name, Attachment *attachment);
|
||||
|
||||
// Removes the attachment from the skin.
|
||||
void removeAttachment(size_t slotIndex, const String& name);
|
||||
|
||||
/// Returns the attachment for the specified slot index and name, or NULL.
|
||||
Attachment *getAttachment(size_t slotIndex, const String &name);
|
||||
|
||||
|
||||
@ -95,6 +95,10 @@ void Skin::addAttachment(size_t slotIndex, const String &name, Attachment *attac
|
||||
_attachments.put(slotIndex, name, attachment);
|
||||
}
|
||||
|
||||
void Skin::removeAttachment(size_t slotIndex, const String& name) {
|
||||
_attachments.remove(slotIndex, name);
|
||||
}
|
||||
|
||||
Attachment *Skin::getAttachment(size_t slotIndex, const String &name) {
|
||||
return _attachments.get(slotIndex, name);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user