mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +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 attachmentName = self.attachmentNames[frameIndex]
|
||||||
local slot = skeleton.slotsByName[self.slotName]
|
local slot = skeleton.slotsByName[self.slotName]
|
||||||
if attachmentName then
|
if attachmentName then
|
||||||
if not slot.attachment then
|
if not slot.attachment then
|
||||||
slot:setAttachment(skeleton:getAttachment(self.slotName, attachmentName))
|
slot:setAttachment(skeleton:getAttachment(self.slotName, attachmentName))
|
||||||
elseif slot.attachment.name ~= attachmentName then
|
elseif slot.attachment.name ~= attachmentName then
|
||||||
slot:setAttachment(skeleton:getAttachment(self.slotName, attachmentName))
|
slot:setAttachment(skeleton:getAttachment(self.slotName, attachmentName))
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
slot:setAttachment(nil)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return self
|
return self
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user