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) }; }
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); }
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) }; }