From 0c8ad6e0a79fe15b923eddd5a419606c003680c7 Mon Sep 17 00:00:00 2001 From: Harald Csaszar Date: Tue, 24 Jun 2025 13:51:16 +0200 Subject: [PATCH] [csharp] Minor: Fixed formatting. --- spine-csharp/src/Animation.cs | 2 +- spine-csharp/src/Bone.cs | 4 ++-- spine-csharp/src/PathConstraint.cs | 2 +- spine-csharp/src/Skeleton.cs | 2 +- spine-csharp/src/SlotData.cs | 4 ++-- spine-csharp/src/TransformConstraint.cs | 2 +- .../Spine/Editor/spine-unity/Editor/Utility/SpineHandles.cs | 2 +- .../Editor/spine-unity/Editor/Windows/SkeletonDebugWindow.cs | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/spine-csharp/src/Animation.cs b/spine-csharp/src/Animation.cs index 58cee06a6..466c7621e 100644 --- a/spine-csharp/src/Animation.cs +++ b/spine-csharp/src/Animation.cs @@ -67,7 +67,7 @@ namespace Spine { public void SetTimelines (ExposedList timelines) { if (timelines == null) throw new ArgumentNullException("timelines", "timelines cannot be null."); this.timelines = timelines; - + // Note: avoiding reallocations by adding all hash set entries at // once (EnsureCapacity() is only available in newer .Net versions). int idCount = 0; diff --git a/spine-csharp/src/Bone.cs b/spine-csharp/src/Bone.cs index 2e8265a8f..775609cc7 100644 --- a/spine-csharp/src/Bone.cs +++ b/spine-csharp/src/Bone.cs @@ -44,7 +44,7 @@ namespace Spine { internal Bone parent; internal ExposedList children = new ExposedList(4); - + internal bool sorted; public Bone (BoneData data, Bone parent) @@ -64,6 +64,6 @@ namespace Spine { public Bone Parent { get { return parent; } } public ExposedList Children { get { return children; } } - + } } diff --git a/spine-csharp/src/PathConstraint.cs b/spine-csharp/src/PathConstraint.cs index b13f0390b..908dbb423 100644 --- a/spine-csharp/src/PathConstraint.cs +++ b/spine-csharp/src/PathConstraint.cs @@ -50,7 +50,7 @@ namespace Spine { internal readonly float[] segments = new float[10]; public PathConstraint (PathConstraintData data, Skeleton skeleton) - : base(data, new PathConstraintPose (), new PathConstraintPose ()) { + : base(data, new PathConstraintPose(), new PathConstraintPose()) { if (skeleton == null) throw new ArgumentNullException("skeleton", "skeleton cannot be null."); bones = new ExposedList(data.Bones.Count); diff --git a/spine-csharp/src/Skeleton.cs b/spine-csharp/src/Skeleton.cs index feab04dda..7639b129a 100644 --- a/spine-csharp/src/Skeleton.cs +++ b/spine-csharp/src/Skeleton.cs @@ -96,7 +96,7 @@ namespace Spine { physics.TrimExcess(); color = new Color(1, 1, 1, 1); - + UpdateCache(); } diff --git a/spine-csharp/src/SlotData.cs b/spine-csharp/src/SlotData.cs index 50cc1047c..403cb8c30 100644 --- a/spine-csharp/src/SlotData.cs +++ b/spine-csharp/src/SlotData.cs @@ -43,7 +43,7 @@ namespace Spine { internal BoneData boneData; internal string attachmentName; internal BlendMode blendMode; - + // Nonessential. // bool visible = true; @@ -57,7 +57,7 @@ namespace Spine { /// The index of the slot in . public int Index { get { return index; } } - + /// The bone this slot belongs to. public BoneData BoneData { get { return boneData; } } diff --git a/spine-csharp/src/TransformConstraint.cs b/spine-csharp/src/TransformConstraint.cs index 1a89cbdae..99284dc79 100644 --- a/spine-csharp/src/TransformConstraint.cs +++ b/spine-csharp/src/TransformConstraint.cs @@ -43,7 +43,7 @@ namespace Spine { public class TransformConstraint : Constraint { internal readonly ExposedList bones; internal Bone source; - + public TransformConstraint (TransformConstraintData data, Skeleton skeleton) : base(data, new TransformConstraintPose(), new TransformConstraintPose()) { if (skeleton == null) throw new ArgumentNullException("skeleton", "skeleton cannot be null."); diff --git a/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Utility/SpineHandles.cs b/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Utility/SpineHandles.cs index 5d76527ef..43f2b77ac 100644 --- a/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Utility/SpineHandles.cs +++ b/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Utility/SpineHandles.cs @@ -232,7 +232,7 @@ namespace Spine.Unity.Editor { public static void DrawBone (Transform transform, Bone bone, float boneScale, float skeletonRenderScale = 1f, Vector2? positionOffset = null) { if (UnityEngine.Event.current.type != EventType.Repaint) return; - + var bonePose = bone.AppliedPose; Vector2 offset = positionOffset == null ? Vector2.zero : positionOffset.Value; Vector3 pos = new Vector3(bonePose.WorldX * skeletonRenderScale + offset.x, bonePose.WorldY * skeletonRenderScale + offset.y, 0); diff --git a/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Windows/SkeletonDebugWindow.cs b/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Windows/SkeletonDebugWindow.cs index aab6dff09..294b1866b 100644 --- a/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Windows/SkeletonDebugWindow.cs +++ b/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Windows/SkeletonDebugWindow.cs @@ -357,7 +357,7 @@ namespace Spine.Unity.Editor { foreach (Skin.SkinEntry skinEntry in pair.Value) { Attachment attachment = skinEntry.Attachment; - var slotPose = slot.AppliedPose; + var slotPose = slot.AppliedPose; GUI.contentColor = slotPose.Attachment == attachment ? Color.white : Color.grey; EditorGUI.indentLevel = baseIndent + 2; Texture2D icon = Icons.GetAttachmentIcon(attachment);