瀏覽代碼

Issue #100 Used the AtlasRegion page RenderObject (rather than the incorrect RegionAttachment RenderObject) as the Texture2D to draw the skeleton with

Morrison Cole 12 年之前
父節點
當前提交
2d869518d7
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      spine-xna/src/SkeletonRenderer.cs

+ 2 - 1
spine-xna/src/SkeletonRenderer.cs

@@ -77,7 +77,8 @@ namespace Spine {
 				RegionAttachment regionAttachment = slot.Attachment as RegionAttachment;
 				if (regionAttachment != null) {
 					SpriteBatchItem item = batcher.CreateBatchItem();
-					item.Texture = (Texture2D)regionAttachment.RendererObject;
+					AtlasRegion region = (AtlasRegion)regionAttachment.RendererObject;
+					item.Texture = (Texture2D)region.page.rendererObject;
 
 					byte r = (byte)(skeleton.R * slot.R * 255);
 					byte g = (byte)(skeleton.G * slot.G * 255);