mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
[libgdx] AnimationState, fixed attachment and draw order threshold TrackEntry settings.
closes #1204
This commit is contained in:
parent
d9e39c2866
commit
b4c50035b8
@ -280,6 +280,7 @@ public class AnimationState {
|
|||||||
from.totalAlpha = 0;
|
from.totalAlpha = 0;
|
||||||
for (int i = 0; i < timelineCount; i++) {
|
for (int i = 0; i < timelineCount; i++) {
|
||||||
Timeline timeline = (Timeline)timelines[i];
|
Timeline timeline = (Timeline)timelines[i];
|
||||||
|
MixDirection direction = MixDirection.out;
|
||||||
MixBlend timelineBlend;
|
MixBlend timelineBlend;
|
||||||
float alpha;
|
float alpha;
|
||||||
switch (timelineMode[i]) {
|
switch (timelineMode[i]) {
|
||||||
@ -307,8 +308,16 @@ public class AnimationState {
|
|||||||
if (timeline instanceof RotateTimeline) {
|
if (timeline instanceof RotateTimeline) {
|
||||||
applyRotateTimeline(timeline, skeleton, animationTime, alpha, timelineBlend, timelinesRotation, i << 1,
|
applyRotateTimeline(timeline, skeleton, animationTime, alpha, timelineBlend, timelinesRotation, i << 1,
|
||||||
firstFrame);
|
firstFrame);
|
||||||
} else
|
} else {
|
||||||
timeline.apply(skeleton, animationLast, animationTime, events, alpha, timelineBlend, MixDirection.out);
|
if (timelineBlend == MixBlend.setup) {
|
||||||
|
if (timeline instanceof AttachmentTimeline) {
|
||||||
|
if (attachments) direction = MixDirection.in;
|
||||||
|
} else if (timeline instanceof DrawOrderTimeline) {
|
||||||
|
if (drawOrder) direction = MixDirection.in;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
timeline.apply(skeleton, animationLast, animationTime, events, alpha, timelineBlend, direction);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user