mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-16 03:51:37 +08:00
Unnoticeably faster frontFacing SkeletonRenderer
Cached slot.bone to remove 3 dereferences.
This commit is contained in:
parent
a903db829b
commit
e85c1b49a0
@ -417,7 +417,8 @@ public class SkeletonRenderer : MonoBehaviour {
|
||||
for (int i = startSlot, triangleIndex = 0; i < endSlot; i++) {
|
||||
Slot slot = drawOrder[i];
|
||||
Attachment attachment = slot.attachment;
|
||||
bool flip = frontFacing && ((slot.Bone.WorldFlipX != slot.Bone.WorldFlipY) != (Mathf.Sign(slot.Bone.WorldScaleX) != Mathf.Sign(slot.bone.WorldScaleY)));
|
||||
Bone bone = slot.bone;
|
||||
bool flip = frontFacing && ((bone.WorldFlipX != bone.WorldFlipY) != (Mathf.Sign(bone.WorldScaleX) != Mathf.Sign(bone.WorldScaleY)));
|
||||
|
||||
if (attachment is RegionAttachment) {
|
||||
if (!flip) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user