mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-22 02:06:03 +08:00
[XNA] Fixed compatibility with spine-csharp
This commit is contained in:
parent
e116c15ffb
commit
3d19e22064
@ -90,10 +90,11 @@ namespace Spine {
|
|||||||
|
|
||||||
public void Draw (Skeleton skeleton) {
|
public void Draw (Skeleton skeleton) {
|
||||||
float[] vertices = this.vertices;
|
float[] vertices = this.vertices;
|
||||||
List<Slot> drawOrder = skeleton.DrawOrder;
|
var drawOrder = skeleton.DrawOrder;
|
||||||
|
var drawOrderItems = skeleton.DrawOrder.Items;
|
||||||
float skeletonR = skeleton.R, skeletonG = skeleton.G, skeletonB = skeleton.B, skeletonA = skeleton.A;
|
float skeletonR = skeleton.R, skeletonG = skeleton.G, skeletonB = skeleton.B, skeletonA = skeleton.A;
|
||||||
for (int i = 0, n = drawOrder.Count; i < n; i++) {
|
for (int i = 0, n = drawOrder.Count; i < n; i++) {
|
||||||
Slot slot = drawOrder[i];
|
Slot slot = drawOrderItems[i];
|
||||||
Attachment attachment = slot.Attachment;
|
Attachment attachment = slot.Attachment;
|
||||||
if (attachment is RegionAttachment) {
|
if (attachment is RegionAttachment) {
|
||||||
RegionAttachment regionAttachment = (RegionAttachment)attachment;
|
RegionAttachment regionAttachment = (RegionAttachment)attachment;
|
||||||
|
|||||||
@ -83,10 +83,11 @@ namespace Spine {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void Draw (Skeleton skeleton) {
|
public void Draw (Skeleton skeleton) {
|
||||||
List<Slot> drawOrder = skeleton.DrawOrder;
|
var drawOrder = skeleton.DrawOrder;
|
||||||
|
var drawOrderItems = skeleton.DrawOrder.Items;
|
||||||
float skeletonR = skeleton.R, skeletonG = skeleton.G, skeletonB = skeleton.B, skeletonA = skeleton.A;
|
float skeletonR = skeleton.R, skeletonG = skeleton.G, skeletonB = skeleton.B, skeletonA = skeleton.A;
|
||||||
for (int i = 0, n = drawOrder.Count; i < n; i++) {
|
for (int i = 0, n = drawOrder.Count; i < n; i++) {
|
||||||
Slot slot = drawOrder[i];
|
Slot slot = drawOrderItems[i];
|
||||||
RegionAttachment regionAttachment = slot.Attachment as RegionAttachment;
|
RegionAttachment regionAttachment = slot.Attachment as RegionAttachment;
|
||||||
if (regionAttachment != null) {
|
if (regionAttachment != null) {
|
||||||
BlendState blend = slot.Data.BlendMode == BlendMode.additive ? BlendState.Additive : defaultBlendState;
|
BlendState blend = slot.Data.BlendMode == BlendMode.additive ? BlendState.Additive : defaultBlendState;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user