[csharp] Fix attachment and draworder threshold TrackEntry settings.

Port of: b4c50035b8
see: https://github.com/EsotericSoftware/spine-runtimes/issues/1204
This commit is contained in:
pharan 2018-12-03 18:26:51 +08:00 committed by GitHub
parent 536ccce9ea
commit 2db2f22705
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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);
}
}
}