示例#1
0
文件: XmlMngr.cs 项目: nadita/vj
 public void ReadXmlConf()
 {
     try
     {
         XmlDocument doc = new XmlDocument();
         doc.Load(bombermanGConfigXml);
         for (int i = 0; i < 6; i++)
         {
             levels[i] = new Level();
         }
         GetListBombermanGConfiguration(doc);
     }
     catch (Exception e) { }
 }
示例#2
0
文件: XmlMngr.cs 项目: nadita/vj
        private Level ReadDataConfiguration(XmlNode levelNode)
        {
            Level level = new Level();

            if (levelNode != null)
            {
                XmlNodeList levelData = levelNode.ChildNodes;
                XmlElement width = (XmlElement)levelData.Item(0);
                //GlobalVariables.WIDTH = int.Parse(width.GetAttribute("width"));
                //level.bombermanPosX = int.Parse(width.GetAttribute("posX"));
            }
            return level;
        }
示例#3
0
文件: XmlMngr.cs 项目: nadita/vj
        private Level LoadLevel(XmlNode levelNode)
        {
            Level level = new Level();

            if (levelNode != null)
            {
                XmlNodeList levelData = levelNode.ChildNodes;
                level.blocks = LoadBlocks(levelData.Item(0));
                level.powerUps = LoadPowerUps(levelData.Item(1));
                level.enemies = LoadEnemies(levelData.Item(2));
            }
            return level;
        }