mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
Source formatting.
So fresh and so clean!
This commit is contained in:
parent
9478db3d2d
commit
91340709d4
@ -41,7 +41,6 @@ namespace Spine {
|
|||||||
public class ExposedList<T> : IEnumerable<T> {
|
public class ExposedList<T> : IEnumerable<T> {
|
||||||
public T[] Items;
|
public T[] Items;
|
||||||
public int Count;
|
public int Count;
|
||||||
|
|
||||||
private const int DefaultCapacity = 4;
|
private const int DefaultCapacity = 4;
|
||||||
private static readonly T[] EmptyArray = new T[0];
|
private static readonly T[] EmptyArray = new T[0];
|
||||||
private int version;
|
private int version;
|
||||||
@ -525,7 +524,6 @@ namespace Spine {
|
|||||||
private ExposedList<T> l;
|
private ExposedList<T> l;
|
||||||
private int next;
|
private int next;
|
||||||
private int ver;
|
private int ver;
|
||||||
|
|
||||||
private T current;
|
private T current;
|
||||||
|
|
||||||
internal Enumerator (ExposedList<T> l)
|
internal Enumerator (ExposedList<T> l)
|
||||||
|
|||||||
@ -33,8 +33,7 @@ using System.IO;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
|
||||||
namespace Spine
|
namespace Spine {
|
||||||
{
|
|
||||||
// Example usage:
|
// Example usage:
|
||||||
//
|
//
|
||||||
// using UnityEngine;
|
// using UnityEngine;
|
||||||
@ -417,23 +416,17 @@ namespace Spine
|
|||||||
|
|
||||||
if (value == null) {
|
if (value == null) {
|
||||||
builder.Append("null");
|
builder.Append("null");
|
||||||
}
|
} else if ((asStr = value as string) != null) {
|
||||||
else if ((asStr = value as string) != null) {
|
|
||||||
SerializeString(asStr);
|
SerializeString(asStr);
|
||||||
}
|
} else if (value is bool) {
|
||||||
else if (value is bool) {
|
|
||||||
builder.Append(value.ToString().ToLower());
|
builder.Append(value.ToString().ToLower());
|
||||||
}
|
} else if ((asList = value as IList) != null) {
|
||||||
else if ((asList = value as IList) != null) {
|
|
||||||
SerializeArray(asList);
|
SerializeArray(asList);
|
||||||
}
|
} else if ((asDict = value as IDictionary) != null) {
|
||||||
else if ((asDict = value as IDictionary) != null) {
|
|
||||||
SerializeObject(asDict);
|
SerializeObject(asDict);
|
||||||
}
|
} else if (value is char) {
|
||||||
else if (value is char) {
|
|
||||||
SerializeString(value.ToString());
|
SerializeString(value.ToString());
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
SerializeOther(value);
|
SerializeOther(value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -508,8 +501,7 @@ namespace Spine
|
|||||||
int codepoint = Convert.ToInt32(c);
|
int codepoint = Convert.ToInt32(c);
|
||||||
if ((codepoint >= 32) && (codepoint <= 126)) {
|
if ((codepoint >= 32) && (codepoint <= 126)) {
|
||||||
builder.Append(c);
|
builder.Append(c);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
builder.Append("\\u" + Convert.ToString(codepoint, 16).PadLeft(4, '0'));
|
builder.Append("\\u" + Convert.ToString(codepoint, 16).PadLeft(4, '0'));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -532,8 +524,7 @@ namespace Spine
|
|||||||
|| value is ulong
|
|| value is ulong
|
||||||
|| value is decimal) {
|
|| value is decimal) {
|
||||||
builder.Append(value.ToString());
|
builder.Append(value.ToString());
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
SerializeString(value.ToString());
|
SerializeString(value.ToString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -122,8 +122,7 @@ public class SpineAttachment : PropertyAttribute {
|
|||||||
slot = "";
|
slot = "";
|
||||||
name = "";
|
name = "";
|
||||||
return;
|
return;
|
||||||
}
|
} else if (chunks.Length < 2) {
|
||||||
else if (chunks.Length < 2) {
|
|
||||||
throw new System.Exception("Cannot generate Attachment Hierarchy from string! Not enough components! [" + fullPath + "]");
|
throw new System.Exception("Cannot generate Attachment Hierarchy from string! Not enough components! [" + fullPath + "]");
|
||||||
}
|
}
|
||||||
skin = chunks[0];
|
skin = chunks[0];
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user