From 72f3ad3fb06ace3e236d33c54d8074de56b6bfbe Mon Sep 17 00:00:00 2001 From: Luke Ingram Date: Thu, 20 Jan 2022 17:53:47 -0400 Subject: [PATCH] [ts] Fixed assigning attachment to slot --- spine-ts/core/src/Animation.ts | 2 +- spine-ts/core/src/AnimationState.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spine-ts/core/src/Animation.ts b/spine-ts/core/src/Animation.ts index c259e97b8..36ad09823 100644 --- a/spine-ts/core/src/Animation.ts +++ b/spine-ts/core/src/Animation.ts @@ -829,7 +829,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 ed648fffb..d509b90a4 100644 --- a/spine-ts/core/src/AnimationState.ts +++ b/spine-ts/core/src/AnimationState.ts @@ -260,7 +260,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.