mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
Fixed flipping for spine-as3.
This commit is contained in:
parent
fc4934708f
commit
5c6d94c309
@ -138,12 +138,15 @@ public class SkeletonSprite extends Sprite {
|
|||||||
colorTransform.alphaMultiplier = skeleton.a * slot.a;
|
colorTransform.alphaMultiplier = skeleton.a * slot.a;
|
||||||
wrapper.transform.colorTransform = colorTransform;
|
wrapper.transform.colorTransform = colorTransform;
|
||||||
|
|
||||||
|
var flipX:int = skeleton.flipX ? -1 : 1;
|
||||||
|
var flipY:int = skeleton.flipY ? -1 : 1;
|
||||||
|
|
||||||
var bone:Bone = slot.bone;
|
var bone:Bone = slot.bone;
|
||||||
wrapper.x = bone.worldX;
|
wrapper.x = bone.worldX;
|
||||||
wrapper.y = bone.worldY;
|
wrapper.y = bone.worldY;
|
||||||
wrapper.rotation = -bone.worldRotation;
|
wrapper.rotation = -bone.worldRotation * flipX * flipY;
|
||||||
wrapper.scaleX = bone.worldScaleX;
|
wrapper.scaleX = bone.worldScaleX * flipX;
|
||||||
wrapper.scaleY = bone.worldScaleY;
|
wrapper.scaleY = bone.worldScaleY * flipY;
|
||||||
addChild(wrapper);
|
addChild(wrapper);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user