mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-15 11:31:37 +08:00
[csharp] Minor: Fixed formatting.
This commit is contained in:
parent
7427479312
commit
0c8ad6e0a7
@ -67,7 +67,7 @@ namespace Spine {
|
||||
public void SetTimelines (ExposedList<Timeline> 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;
|
||||
|
||||
@ -44,7 +44,7 @@ namespace Spine {
|
||||
|
||||
internal Bone parent;
|
||||
internal ExposedList<Bone> children = new ExposedList<Bone>(4);
|
||||
|
||||
|
||||
internal bool sorted;
|
||||
|
||||
public Bone (BoneData data, Bone parent)
|
||||
@ -64,6 +64,6 @@ namespace Spine {
|
||||
|
||||
public Bone Parent { get { return parent; } }
|
||||
public ExposedList<Bone> Children { get { return children; } }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -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<BonePose>(data.Bones.Count);
|
||||
|
||||
@ -96,7 +96,7 @@ namespace Spine {
|
||||
physics.TrimExcess();
|
||||
|
||||
color = new Color(1, 1, 1, 1);
|
||||
|
||||
|
||||
UpdateCache();
|
||||
}
|
||||
|
||||
|
||||
@ -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 {
|
||||
|
||||
/// <summary>The index of the slot in <see cref="Skeleton.Slots"/>.</summary>
|
||||
public int Index { get { return index; } }
|
||||
|
||||
|
||||
/// <summary>The bone this slot belongs to.</summary>
|
||||
public BoneData BoneData { get { return boneData; } }
|
||||
|
||||
|
||||
@ -43,7 +43,7 @@ namespace Spine {
|
||||
public class TransformConstraint : Constraint<TransformConstraint, TransformConstraintData, TransformConstraintPose> {
|
||||
internal readonly ExposedList<BonePose> 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.");
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user