From cef85a86c7daa29ec23aa02b4dd0fa09098b8deb Mon Sep 17 00:00:00 2001 From: NathanSweet Date: Fri, 26 Apr 2013 00:59:36 +0200 Subject: [PATCH] Fixed issue #36. --- spine-xna/src/SkeletonRenderer.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/spine-xna/src/SkeletonRenderer.cs b/spine-xna/src/SkeletonRenderer.cs index b9acbc274..cb92ef687 100644 --- a/spine-xna/src/SkeletonRenderer.cs +++ b/spine-xna/src/SkeletonRenderer.cs @@ -73,10 +73,8 @@ namespace Spine { List drawOrder = skeleton.DrawOrder; for (int i = 0, n = drawOrder.Count; i < n; i++) { Slot slot = drawOrder[i]; - Attachment attachment = slot.Attachment; - if (attachment is RegionAttachment) { - RegionAttachment regionAttachment = (RegionAttachment)attachment; - + RegionAttachment regionAttachment = slot.Attachment as RegionAttachment; + if (regionAttachment != null) { SpriteBatchItem item = batcher.CreateBatchItem(); item.Texture = (Texture2D)regionAttachment.Texture;