mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-20 17:26:01 +08:00
[lua] Fix for clearTracks, see #805
This commit is contained in:
parent
a596aa49e7
commit
2be667dd62
@ -496,12 +496,13 @@ end
|
||||
function AnimationState:clearTracks ()
|
||||
local queue = self.queue
|
||||
local tracks = self.tracks
|
||||
local oldDrainDisabled = queue.drainDisabled
|
||||
queue.drainDisabled = true;
|
||||
for i,track in pairs(tracks) do
|
||||
self:clearTrack(i)
|
||||
end
|
||||
tracks = {}
|
||||
queue.drainDisabled = false;
|
||||
queue.drainDisabled = oldDrainDisabled
|
||||
queue:drain();
|
||||
end
|
||||
|
||||
@ -635,11 +636,12 @@ end
|
||||
|
||||
function AnimationState:setEmptyAnimations (mixDuration)
|
||||
local queue = self.queue
|
||||
local oldDrainDisabled = queue.drainDisabled
|
||||
queue.drainDisabled = true
|
||||
for i,current in pairs(self.tracks) do
|
||||
if current then self:setEmptyAnimation(current.trackIndex, mixDuration) end
|
||||
end
|
||||
queue.drainDisabled = false
|
||||
queue.drainDisabled = oldDrainDisabled
|
||||
queue:drain()
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user