예제 #1
0
 public WorldTexture GetWorldTexture(Microsoft.Xna.Framework.Graphics.GraphicsDevice device)
 {
     var iff = Parent.ChunkParent;
     var spr2 = iff.Get<SPR2>((ushort)this.SpriteID);
     if (spr2 != null)
     {
         return spr2.Frames[this.SpriteFrameIndex].GetWorldTexture(device);
     }
     var spr1 = iff.Get<SPR>((ushort)this.SpriteID);
     if (spr1 != null)
     {
         var result = new WorldTexture();
         result.Pixel = spr1.Frames[(int)this.SpriteFrameIndex].GetTexture(device);
         return result;
     }
     return null;
 }
예제 #2
0
 public WorldTexture GetWorldTexture(GraphicsDevice device)
 {
     var result = new WorldTexture
     {
         Pixel = this.GetTexture(device)
     };
     if (this.ZBufferData != null){
         result.ZBuffer = this.GetZTexture(device);
     }
     return result;
 }