示例#1
0
 public static void GetPrivateFields(this SpriteFont font, out FontFields result)
 {
     result = new FontFields {
         Texture         = (Texture2D)(textureValue).GetValue(font),
         GlyphRectangles = (List <Rectangle>)glyphData.GetValue(font),
         CropRectangles  = (List <Rectangle>)croppingData.GetValue(font),
         Characters      = (List <char>)characterMap.GetValue(font),
         Kerning         = (List <Vector3>)kerning.GetValue(font)
     };
 }
示例#2
0
        public static bool GetPrivateFields(this SpriteFont font, out FontFields result)
        {
            if (textureValue == null)
            {
                result = default(FontFields);
                return(false);
            }

            result = new FontFields {
                Texture         = (Texture2D)(textureValue).GetValue(font),
                GlyphRectangles = (List <Rectangle>)glyphData.GetValue(font),
                CropRectangles  = (List <Rectangle>)croppingData.GetValue(font),
                Characters      = (List <char>)characterMap.GetValue(font),
                Kerning         = (List <Vector3>)kerning.GetValue(font)
            };
            return(true);
        }
示例#3
0
文件: Evil.cs 项目: sq/Fracture
 public static void GetPrivateFields(this SpriteFont font, out FontFields result)
 {
     result = new FontFields {
         Texture = (Texture2D)(textureValue).GetValue(font),
         GlyphRectangles = (List<Rectangle>)glyphData.GetValue(font),
         CropRectangles = (List<Rectangle>)croppingData.GetValue(font),
         Characters = (List<char>)characterMap.GetValue(font),
         Kerning = (List<Vector3>)kerning.GetValue(font)
     };
 }