[csharp] Fixed compile error after merge of 3.7 branch to 3.8 caused changes to Slot.cs to vanish, since there was a major reordering of methods happening. Reintroduced changes of commit 9deb3be61c855e4dcd14d53751a9bfdd7d890cf4 for Slot.cs, fixing all compile errors again.

This commit is contained in:
Harald Csaszar 2019-04-02 20:19:34 +02:00
parent 9bb5a0d044
commit 4777009d79

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> attachmentVertices = new ExposedList<float>(); internal ExposedList<float> deform = 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,6 +84,7 @@ 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,13 +123,13 @@ namespace Spine {
get { return attachment; } get { return attachment; }
/// <summary> /// <summary>
/// Sets the slot's attachment and, if the attachment changed, resets <see cref="AttachmentTime"/> and clears /// Sets the slot's attachment and, if the attachment changed, resets <see cref="AttachmentTime"/> and clears
/// <see cref="AttachmentVertices">.</summary> /// <see cref="Deform">.</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;
attachmentVertices.Clear(false); deform.Clear(false);
} }
} }
@ -143,13 +144,13 @@ namespace Spine {
/// 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> AttachmentVertices { public ExposedList<float> Deform {
get { get {
return attachmentVertices; return deform;
} }
set { set {
if (attachmentVertices == null) throw new ArgumentNullException("attachmentVertices", "attachmentVertices cannot be null."); if (deform == null) throw new ArgumentNullException("deform", "deform cannot be null.");
attachmentVertices = value; deform = value;
} }
} }