Merge branch '3.7' into 3.8-beta

This commit is contained in:
badlogic 2019-03-27 15:13:00 +01:00
commit dae018e889

View File

@ -45,7 +45,7 @@ namespace Spine {
internal bool hasSecondColor; internal bool hasSecondColor;
internal Attachment attachment; internal Attachment attachment;
internal float attachmentTime; internal float attachmentTime;
internal ExposedList<float> deform = new ExposedList<float>(); internal ExposedList<float> attachmentVertices = new ExposedList<float>();
public Slot (SlotData data, Bone bone) { public Slot (SlotData data, Bone bone) {
if (data == null) throw new ArgumentNullException("data", "data cannot be null."); if (data == null) throw new ArgumentNullException("data", "data cannot be null.");
@ -84,7 +84,6 @@ namespace Spine {
attachment = slot.attachment; attachment = slot.attachment;
attachmentTime = slot.attachmentTime; attachmentTime = slot.attachmentTime;
deform.AddRange(slot.deform);
} }
/// <summary>The slot's setup pose data.</summary> /// <summary>The slot's setup pose data.</summary>
@ -122,14 +121,14 @@ namespace Spine {
/// <summary>The current attachment for the slot, or null if the slot has no attachment.</summary> /// <summary>The current attachment for the slot, or null if the slot has no attachment.</summary>
get { return attachment; } get { return attachment; }
/// <summary> /// <summary>
/// Sets the slot's attachment and, if the attachment changed, resets <see cref="AttachmentTime"/> and clears <see cref="Deform">. /// Sets the slot's attachment and, if the attachment changed, resets <see cref="AttachmentTime"/> and clears
/// </summary> /// <see cref="AttachmentVertices">.</summary>
/// <param name="value">May be null.</param> /// <param name="value">May be null.</param>
set { set {
if (attachment == value) return; if (attachment == value) return;
attachment = value; attachment = value;
attachmentTime = bone.skeleton.time; attachmentTime = bone.skeleton.time;
deform.Clear(false); attachmentVertices.Clear(false);
} }
} }
@ -140,17 +139,17 @@ namespace Spine {
set { attachmentTime = bone.skeleton.time - value; } set { attachmentTime = bone.skeleton.time - value; }
} }
/// <summary> Values to deform the slot's attachment. For an unweighted mesh, the entries are local positions for each vertex. For a /// <summary> Vertices to deform the slot's attachment. For an unweighted mesh, the entries are local positions for each vertex. For a
/// weighted mesh, the entries are an offset for each vertex which will be added to the mesh's local vertex positions. /// weighted mesh, the entries are an offset for each vertex which will be added to the mesh's local vertex positions.
/// <para /> /// <para />
/// See <see cref="VertexAttachment.ComputeWorldVertices(Slot, int, int, float[], int, int)"/> and <see cref="DeformTimeline"/>.</summary> /// See <see cref="VertexAttachment.ComputeWorldVertices(Slot, int, int, float[], int, int)"/> and <see cref="DeformTimeline"/>.</summary>
public ExposedList<float> Deform { public ExposedList<float> AttachmentVertices {
get { get {
return deform; return attachmentVertices;
} }
set { set {
if (deform == null) throw new ArgumentNullException("deform", "deform cannot be null."); if (attachmentVertices == null) throw new ArgumentNullException("attachmentVertices", "attachmentVertices cannot be null.");
deform = value; attachmentVertices = value;
} }
} }
@ -180,4 +179,4 @@ namespace Spine {
return data.name; return data.name;
} }
} }
} }