diff --git a/spine-ts/core/src/Animation.ts b/spine-ts/core/src/Animation.ts index e12ef090d..13bd0bdad 100644 --- a/spine-ts/core/src/Animation.ts +++ b/spine-ts/core/src/Animation.ts @@ -1455,7 +1455,7 @@ module spine { } 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)); } } diff --git a/spine-ts/core/src/AnimationState.ts b/spine-ts/core/src/AnimationState.ts index 632c23278..fd4a6ce46 100644 --- a/spine-ts/core/src/AnimationState.ts +++ b/spine-ts/core/src/AnimationState.ts @@ -270,7 +270,7 @@ module spine { var slot = slots[i]; if (slot.attachmentState == setupState) { 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. @@ -390,7 +390,7 @@ module spine { } setAttachment (skeleton: Skeleton, slot: Slot, attachmentName: string, attachments: boolean) { - slot.attachment = attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName); + slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName)); if (attachments) slot.attachmentState = this.unkeyedState + AnimationState.CURRENT; }