[unity] Use MixBlend in 3.7

This commit is contained in:
John 2018-05-17 03:49:55 +08:00 committed by GitHub
parent a3a0648ce7
commit a9c469a4a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -149,8 +149,8 @@ namespace Spine.Unity.Playables {
skeleton.SetToSetupPose();
float fauxFromAlpha = (1f - toClipTime/mixDuration);
fauxFromAlpha = fauxFromAlpha > 0.5f ? 1f : fauxFromAlpha * 2f; // fake value, but reduce dip.
fromAnimation.Apply(skeleton, 0, fromClipTime, fromClipLoop, null, fauxFromAlpha, MixPose.Setup, MixDirection.Out); //fromAnimation.PoseSkeleton(skeleton, fromClipTime, fromClipLoop);
toAnimation.Apply(skeleton, 0, toClipTime, clipData.loop, null, toClipTime/mixDuration, MixPose.Current, MixDirection.In);
fromAnimation.Apply(skeleton, 0, fromClipTime, fromClipLoop, null, fauxFromAlpha, MixBlend.Setup, MixDirection.Out); //fromAnimation.PoseSkeleton(skeleton, fromClipTime, fromClipLoop);
toAnimation.Apply(skeleton, 0, toClipTime, clipData.loop, null, toClipTime/mixDuration, MixBlend.Replace, MixDirection.In);
} else {
skeleton.SetToSetupPose();
toAnimation.PoseSkeleton(skeleton, toClipTime, clipData.loop);
@ -165,4 +165,4 @@ namespace Spine.Unity.Playables {
}
}
#endif
#endif