|
@@ -58,7 +58,7 @@ namespace Spine {
|
|
|
bones = new ExposedList<Bone>();
|
|
|
foreach (BoneData boneData in data.bones)
|
|
|
bones.Add (skeleton.FindBone (boneData.name));
|
|
|
-
|
|
|
+
|
|
|
target = skeleton.FindBone(data.target.name);
|
|
|
}
|
|
|
|
|
@@ -230,13 +230,13 @@ namespace Spine {
|
|
|
}
|
|
|
|
|
|
float scaleX = bone.ascaleX, scaleY = bone.ascaleY;
|
|
|
- if (scaleMix > 0) {
|
|
|
+ if (scaleMix != 0) {
|
|
|
if (scaleX > 0.00001f) scaleX = (scaleX + (target.ascaleX - scaleX + data.offsetScaleX) * scaleMix) / scaleX;
|
|
|
if (scaleY > 0.00001f) scaleY = (scaleY + (target.ascaleY - scaleY + data.offsetScaleY) * scaleMix) / scaleY;
|
|
|
}
|
|
|
|
|
|
float shearY = bone.ashearY;
|
|
|
- if (shearMix > 0) {
|
|
|
+ if (shearMix != 0) {
|
|
|
float r = target.ashearY - shearY + data.offsetShearY;
|
|
|
r -= (16384 - (int)(16384.499999999996 - r / 360)) * 360;
|
|
|
bone.shearY += r * shearMix;
|
|
@@ -265,13 +265,13 @@ namespace Spine {
|
|
|
}
|
|
|
|
|
|
float scaleX = bone.ascaleX, scaleY = bone.ascaleY;
|
|
|
- if (scaleMix > 0) {
|
|
|
+ if (scaleMix != 0) {
|
|
|
if (scaleX > 0.00001f) scaleX *= ((target.ascaleX - 1 + data.offsetScaleX) * scaleMix) + 1;
|
|
|
if (scaleY > 0.00001f) scaleY *= ((target.ascaleY - 1 + data.offsetScaleY) * scaleMix) + 1;
|
|
|
}
|
|
|
|
|
|
float shearY = bone.ashearY;
|
|
|
- if (shearMix > 0) shearY += (target.ashearY + data.offsetShearY) * shearMix;
|
|
|
+ if (shearMix != 0) shearY += (target.ashearY + data.offsetShearY) * shearMix;
|
|
|
|
|
|
bone.UpdateWorldTransform(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);
|
|
|
}
|