Fixed flipping for spine-as3.

This commit is contained in:
NathanSweet 2013-10-24 12:26:30 +02:00
parent fc4934708f
commit 5c6d94c309

View File

@ -138,12 +138,15 @@ public class SkeletonSprite extends Sprite {
colorTransform.alphaMultiplier = skeleton.a * slot.a;
wrapper.transform.colorTransform = colorTransform;
var flipX:int = skeleton.flipX ? -1 : 1;
var flipY:int = skeleton.flipY ? -1 : 1;
var bone:Bone = slot.bone;
wrapper.x = bone.worldX;
wrapper.y = bone.worldY;
wrapper.rotation = -bone.worldRotation;
wrapper.scaleX = bone.worldScaleX;
wrapper.scaleY = bone.worldScaleY;
wrapper.rotation = -bone.worldRotation * flipX * flipY;
wrapper.scaleX = bone.worldScaleX * flipX;
wrapper.scaleY = bone.worldScaleY * flipY;
addChild(wrapper);
}
}