Skip to content

Commit

Permalink
[csharp] Port of bugfix commits 8e21d09 and 9b37c31, resetting mixBle…
Browse files Browse the repository at this point in the history
…nd and stepped timelines. See #1903.
  • Loading branch information
HaraldCsaszar committed Jun 15, 2021
1 parent 9b37c31 commit 9507609
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions spine-csharp/src/AnimationState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -832,6 +832,7 @@ private TrackEntry NewTrackEntry (int trackIndex, Animation animation, bool loop
entry.interruptAlpha = 1;
entry.mixTime = 0;
entry.mixDuration = last == null ? 0 : data.GetMix(last.animation, animation);
entry.mixBlend = MixBlend.Replace;
return entry;
}

Expand Down
5 changes: 3 additions & 2 deletions spine-csharp/src/SkeletonJson.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1107,8 +1107,9 @@ static Timeline ReadTimeline (ref List<object>.Enumerator keyMapEnumerator, Curv
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;
Expand Down

0 comments on commit 9507609

Please sign in to comment.