mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
[libgdx] Fixed snap when a mix completes while later mixes are still in progress.
The limit is a, not 0.
This commit is contained in:
parent
f68e498154
commit
2c53123666
@ -255,7 +255,8 @@ public class AnimationState {
|
||||
boolean attachments = mix < from.mixAttachmentThreshold, drawOrder = mix < from.mixDrawOrderThreshold;
|
||||
int timelineCount = from.animation.timelines.size;
|
||||
Timeline[] timelines = from.animation.timelines.items;
|
||||
float alphaMix = from.alpha * fromMix * (1 - mix), keep = 1 - mix * to.alpha, alphaHold = keep > 0 ? alphaMix / keep : 0;
|
||||
float a = from.alpha * fromMix, keep = 1 - mix * to.alpha;
|
||||
float alphaMix = a * (1 - mix), alphaHold = keep > 0 ? alphaMix / keep : a;
|
||||
float animationLast = from.animationLast, animationTime = from.getAnimationTime(), applyTime = animationTime;
|
||||
Array<Event> events = null;
|
||||
if (from.reverse)
|
||||
@ -291,12 +292,10 @@ public class AnimationState {
|
||||
timeline.apply(skeleton, animationLast, applyTime, events, alpha, fromSetup, add, out, false);
|
||||
}
|
||||
}
|
||||
|
||||
if (to.mixDuration > 0) queueEvents(from, animationTime);
|
||||
this.events.clear();
|
||||
from.nextAnimationLast = animationTime;
|
||||
from.nextTrackLast = from.trackTime;
|
||||
|
||||
return mix;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user