Пример #1
0
 private static void LoadFonts(XmlNode main)
 {
     XmlNode fontNode = main.SelectSingleNode("Fonts");
     string fontBasePath = fontNode.Attributes["basePath"].Value;
     XmlNodeList fonts = fontNode.SelectNodes("Font");
     foreach (XmlNode f in fonts)
     {
         string gameName = f.Attributes["gameName"].Value;
         string fileName = f.Attributes["fileName"].Value;
         string sizestr = f.Attributes["size"].Value;
         float size = float.Parse(sizestr);
         BitmapFont font = new BitmapFont(fontBasePath + "//" + fileName, size);
         _fonts[gameName] = font;
     }
 }