mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-04 14:24:53 +08:00
[ts] Fixed assigning attachment to slot
This commit is contained in:
parent
1aa112fe40
commit
72f3ad3fb0
@ -829,7 +829,7 @@ module spine {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setAttachment(skeleton: Skeleton, slot: Slot, attachmentName: string) {
|
setAttachment(skeleton: Skeleton, slot: Slot, attachmentName: string) {
|
||||||
slot.attachment = attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName);
|
slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -260,7 +260,7 @@ module spine {
|
|||||||
var slot = slots[i];
|
var slot = slots[i];
|
||||||
if (slot.attachmentState == setupState) {
|
if (slot.attachmentState == setupState) {
|
||||||
var attachmentName = slot.data.attachmentName;
|
var attachmentName = slot.data.attachmentName;
|
||||||
slot.attachment = (attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName));
|
slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.unkeyedState += 2; // Increasing after each use avoids the need to reset attachmentState for every slot.
|
this.unkeyedState += 2; // Increasing after each use avoids the need to reset attachmentState for every slot.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user