Esempio n. 1
0
File: XmlMngr.cs Progetto: 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) { }
 }
Esempio n. 2
0
File: XmlMngr.cs Progetto: 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;
        }
Esempio n. 3
0
File: XmlMngr.cs Progetto: 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;
        }