mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
[csharp] Fixes for clipping.
based on : ea6319820f
Fixes: https://github.com/EsotericSoftware/spine-runtimes/pull/936
This commit is contained in:
parent
c84792fa18
commit
76b7e245bd
@ -420,10 +420,17 @@ namespace Spine {
|
|||||||
ClippingAttachment clip = attachmentLoader.NewClippingAttachment(skin, name);
|
ClippingAttachment clip = attachmentLoader.NewClippingAttachment(skin, name);
|
||||||
if (clip == null) return null;
|
if (clip == null) return null;
|
||||||
|
|
||||||
SlotData slot = skeletonData.FindSlot(GetString(map, "end", null));
|
string end = GetString(map, "end", null);
|
||||||
if (slot == null) throw new Exception("Clipping end slot not found: " + GetString(map, "end", null));
|
if (end != null) {
|
||||||
clip.endSlot = slot;
|
SlotData slot = skeletonData.FindSlot(end);
|
||||||
|
if (slot == null) throw new Exception("Clipping end slot not found: " + end);
|
||||||
|
clip.EndSlot = slot;
|
||||||
|
}
|
||||||
|
|
||||||
ReadVertices(map, clip, GetInt(map, "vertexCount", 0) << 1);
|
ReadVertices(map, clip, GetInt(map, "vertexCount", 0) << 1);
|
||||||
|
|
||||||
|
//string color = GetString(map, "color", null);
|
||||||
|
// if (color != null) clip.color = color;
|
||||||
return clip;
|
return clip;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user