Merge branch '3.7-beta' into 3.7-beta-cpp

This commit is contained in:
badlogic 2018-12-03 16:52:32 +01:00
commit 0fafe7d1a0
5 changed files with 33 additions and 16 deletions

View File

@ -1205,9 +1205,7 @@ namespace Spine {
int[] drawOrderToSetupIndex = drawOrders[frame];
if (drawOrderToSetupIndex == null) {
drawOrder.Clear();
for (int i = 0, n = slots.Count; i < n; i++)
drawOrder.Add(slots.Items[i]);
Array.Copy(slots.Items, 0, drawOrder.Items, 0, slots.Count);
} else {
var drawOrderItems = drawOrder.Items;
var slotsItems = slots.Items;

View File

@ -254,6 +254,7 @@ namespace Spine {
from.totalAlpha = 0;
for (int i = 0; i < timelineCount; i++) {
Timeline timeline = timelinesItems[i];
MixDirection direction = MixDirection.Out;
MixBlend timelineBlend;
float alpha;
switch (timelineMode[i]) {
@ -283,7 +284,17 @@ namespace Spine {
if (rotateTimeline != null) {
ApplyRotateTimeline(rotateTimeline, skeleton, animationTime, alpha, timelineBlend, timelinesRotation, i << 1, firstFrame);
} else {
timeline.Apply(skeleton, animationLast, animationTime, eventBuffer, alpha, timelineBlend, MixDirection.Out);
if (timelineBlend == MixBlend.Setup) {
if (timeline is AttachmentTimeline) {
if (attachments) direction = MixDirection.In;
} else if (timeline is DrawOrderTimeline) {
if (drawOrder) {
direction = MixDirection.In;
}
}
}
timeline.Apply(skeleton, animationLast, animationTime, eventBuffer, alpha, timelineBlend, direction);
}
}
}

View File

@ -280,6 +280,7 @@ public class AnimationState {
from.totalAlpha = 0;
for (int i = 0; i < timelineCount; i++) {
Timeline timeline = (Timeline)timelines[i];
MixDirection direction = MixDirection.out;
MixBlend timelineBlend;
float alpha;
switch (timelineMode[i]) {
@ -307,8 +308,16 @@ public class AnimationState {
if (timeline instanceof RotateTimeline) {
applyRotateTimeline(timeline, skeleton, animationTime, alpha, timelineBlend, timelinesRotation, i << 1,
firstFrame);
} else
timeline.apply(skeleton, animationLast, animationTime, events, alpha, timelineBlend, MixDirection.out);
} else {
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);
}
}
}

View File

@ -340,7 +340,7 @@ public class SkeletonViewer extends ApplicationAdapter {
if (state != null) {
// AnimationState status.
status.setLength(0);
for (int i = 0, n = state.getTracks().size; i < n; i++) {
for (int i = state.getTracks().size - 1; i >= 0; i--) {
TrackEntry entry = state.getTracks().get(i);
if (entry == null) continue;
status.append(i);

View File

@ -378,8 +378,7 @@ namespace Spine.Unity {
layerInfos.interruptingClipTimeAddition = newTime - oldTime;
layerInfos.interruptingStateInfo = interruptingStateInfo;
}
}
else {
} else {
layerInfos.clipInfoCount = clipInfoCount;
layerInfos.nextClipInfoCount = nextClipInfoCount;
layerInfos.interruptingClipInfoCount = 0;