mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-04 22:34:53 +08:00
if there is no attachment, remove it also..
This commit is contained in:
parent
e334e0123c
commit
3a0ba4a70a
@ -415,14 +415,14 @@ function Animation.AttachmentTimeline.new ()
|
||||
local attachmentName = self.attachmentNames[frameIndex]
|
||||
local slot = skeleton.slotsByName[self.slotName]
|
||||
if attachmentName then
|
||||
if not slot.attachment then
|
||||
slot:setAttachment(skeleton:getAttachment(self.slotName, attachmentName))
|
||||
elseif slot.attachment.name ~= attachmentName then
|
||||
slot:setAttachment(skeleton:getAttachment(self.slotName, attachmentName))
|
||||
end
|
||||
if not slot.attachment then
|
||||
slot:setAttachment(skeleton:getAttachment(self.slotName, attachmentName))
|
||||
elseif slot.attachment.name ~= attachmentName then
|
||||
slot:setAttachment(skeleton:getAttachment(self.slotName, attachmentName))
|
||||
end
|
||||
else
|
||||
slot:setAttachment(nil)
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
return self
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user