mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 01:36:02 +08:00
[lua] AnimationState#apply returns boolean indicating if any timeline was applied. #919
This commit is contained in:
parent
061d0d26b2
commit
3e8f3be0e4
@ -366,9 +366,11 @@ function AnimationState:apply (skeleton)
|
|||||||
local events = self.events
|
local events = self.events
|
||||||
local tracks = self.tracks
|
local tracks = self.tracks
|
||||||
local queue = self.queue
|
local queue = self.queue
|
||||||
|
local applied = false
|
||||||
|
|
||||||
for i,current in pairs(tracks) do
|
for i,current in pairs(tracks) do
|
||||||
if not (current == nil or current.delay > 0) then
|
if not (current == nil or current.delay > 0) then
|
||||||
|
applied = true
|
||||||
-- Apply mixing from entries first.
|
-- Apply mixing from entries first.
|
||||||
local mix = current.alpha
|
local mix = current.alpha
|
||||||
if current.mixingFrom then
|
if current.mixingFrom then
|
||||||
@ -407,6 +409,7 @@ function AnimationState:apply (skeleton)
|
|||||||
end
|
end
|
||||||
|
|
||||||
queue:drain()
|
queue:drain()
|
||||||
|
return applied
|
||||||
end
|
end
|
||||||
|
|
||||||
function AnimationState:applyMixingFrom (to, skeleton)
|
function AnimationState:applyMixingFrom (to, skeleton)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user