mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 17:56:04 +08:00
[csharp] Ported addition of x/y bounding coordinates to SkeletonData. See #1325.
This commit is contained in:
parent
67753024ec
commit
d337f587b7
@ -144,6 +144,8 @@ namespace Spine {
|
|||||||
if (skeletonData.hash.Length == 0) skeletonData.hash = null;
|
if (skeletonData.hash.Length == 0) skeletonData.hash = null;
|
||||||
skeletonData.version = ReadString(input);
|
skeletonData.version = ReadString(input);
|
||||||
if (skeletonData.version.Length == 0) skeletonData.version = null;
|
if (skeletonData.version.Length == 0) skeletonData.version = null;
|
||||||
|
skeletonData.x = ReadFloat(input);
|
||||||
|
skeletonData.y = ReadFloat(input);
|
||||||
skeletonData.width = ReadFloat(input);
|
skeletonData.width = ReadFloat(input);
|
||||||
skeletonData.height = ReadFloat(input);
|
skeletonData.height = ReadFloat(input);
|
||||||
|
|
||||||
|
|||||||
@ -44,7 +44,7 @@ namespace Spine {
|
|||||||
internal ExposedList<IkConstraintData> ikConstraints = new ExposedList<IkConstraintData>();
|
internal ExposedList<IkConstraintData> ikConstraints = new ExposedList<IkConstraintData>();
|
||||||
internal ExposedList<TransformConstraintData> transformConstraints = new ExposedList<TransformConstraintData>();
|
internal ExposedList<TransformConstraintData> transformConstraints = new ExposedList<TransformConstraintData>();
|
||||||
internal ExposedList<PathConstraintData> pathConstraints = new ExposedList<PathConstraintData>();
|
internal ExposedList<PathConstraintData> pathConstraints = new ExposedList<PathConstraintData>();
|
||||||
internal float width, height;
|
internal float x , y, width, height;
|
||||||
internal string version, hash;
|
internal string version, hash;
|
||||||
|
|
||||||
// Nonessential.
|
// Nonessential.
|
||||||
@ -74,6 +74,8 @@ namespace Spine {
|
|||||||
public ExposedList<TransformConstraintData> TransformConstraints { get { return transformConstraints; } set { transformConstraints = value; } }
|
public ExposedList<TransformConstraintData> TransformConstraints { get { return transformConstraints; } set { transformConstraints = value; } }
|
||||||
public ExposedList<PathConstraintData> PathConstraints { get { return pathConstraints; } set { pathConstraints = value; } }
|
public ExposedList<PathConstraintData> PathConstraints { get { return pathConstraints; } set { pathConstraints = value; } }
|
||||||
|
|
||||||
|
public float X { get { return x; } set { x = value; } }
|
||||||
|
public float Y { get { return y; } set { y = value; } }
|
||||||
public float Width { get { return width; } set { width = value; } }
|
public float Width { get { return width; } set { width = value; } }
|
||||||
public float Height { get { return height; } set { height = value; } }
|
public float Height { get { return height; } set { height = value; } }
|
||||||
/// <summary>The Spine version used to export this data, or null.</summary>
|
/// <summary>The Spine version used to export this data, or null.</summary>
|
||||||
|
|||||||
@ -100,6 +100,8 @@ namespace Spine {
|
|||||||
var skeletonMap = (Dictionary<string, Object>)root["skeleton"];
|
var skeletonMap = (Dictionary<string, Object>)root["skeleton"];
|
||||||
skeletonData.hash = (string)skeletonMap["hash"];
|
skeletonData.hash = (string)skeletonMap["hash"];
|
||||||
skeletonData.version = (string)skeletonMap["spine"];
|
skeletonData.version = (string)skeletonMap["spine"];
|
||||||
|
skeletonData.x = GetFloat(skeletonMap, "x", 0);
|
||||||
|
skeletonData.y = GetFloat(skeletonMap, "y", 0);
|
||||||
skeletonData.width = GetFloat(skeletonMap, "width", 0);
|
skeletonData.width = GetFloat(skeletonMap, "width", 0);
|
||||||
skeletonData.height = GetFloat(skeletonMap, "height", 0);
|
skeletonData.height = GetFloat(skeletonMap, "height", 0);
|
||||||
skeletonData.fps = GetFloat(skeletonMap, "fps", 0);
|
skeletonData.fps = GetFloat(skeletonMap, "fps", 0);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user