[csharp] Port of bugfix commits 8e21d09 and 9b37c31, resetting mixBlend and stepped timelines. See #1903.

This commit is contained in:
Harald Csaszar 2021-06-15 09:09:10 +02:00
parent 9b37c31cae
commit 950760903b
2 changed files with 4 additions and 2 deletions

View File

@ -832,6 +832,7 @@ namespace Spine {
entry.interruptAlpha = 1;
entry.mixTime = 0;
entry.mixDuration = last == null ? 0 : data.GetMix(last.animation, animation);
entry.mixBlend = MixBlend.Replace;
return entry;
}

View File

@ -1107,8 +1107,9 @@ namespace Spine {
static int ReadCurve (object curve, CurveTimeline timeline, int bezier, int frame, int value, float time1, float time2,
float value1, float value2, float scale) {
if (curve is string) {
if (value != 0) timeline.SetStepped(frame);
string curveString = curve as string;
if (curveString != null) {
if (curveString == "stepped") timeline.SetStepped(frame);
return bezier + 1;
}
var curveValues = (List<object>)curve;