Esempio n. 1
0
    public void Read()
    {
        XmlDocument xmldoc  = new XmlDocument();
        string      xmlText = xLoad("Recharge");

        xmldoc.LoadXml(xmlText);
        XmlNodeList nodelist = xmldoc.SelectSingleNode("root").ChildNodes;

        foreach (XmlNode node in nodelist)
        {
            XmlAttributeCollection xAC = node.Attributes;
            GetAttribute           g   = new GetAttribute(xAC);
            int          id            = int.Parse(node.Name.Replace("ID", ""));
            RechargeItem info          = new RechargeItem();
            info.ID        = id;
            info.CnName    = g.getString("CnName");
            info.CnContent = g.getString("CnContent");
            info.EnName    = g.getString("EnName");
            info.EnContent = g.getString("EnContent");
            info.JpName    = g.getString("JpName");
            info.JpContent = g.getString("JpContent");
            info.Price     = g.getInt("Price");
            info.GemNum    = g.getInt("GemNum");
            if (!dicRechargeList.ContainsKey(id))
            {
                dicRechargeList.Add(id, info);
            }
        }
        HasReadToMemory = true;
        Debug.Log("TableRechargeLoadDone!");
    }
Esempio n. 2
0
    public void Read()
    {
        XmlDocument xmldoc  = new XmlDocument();
        string      xmlText = xLoad("Enemy");

        xmldoc.LoadXml(xmlText);
        XmlNodeList nodelist = xmldoc.SelectSingleNode("root").ChildNodes;

        foreach (XmlNode node in nodelist)
        {
            XmlAttributeCollection xAC = node.Attributes;
            GetAttribute           g   = new GetAttribute(xAC);
            int       id   = int.Parse(node.Name.Replace("ID", ""));
            EnemyInfo info = new EnemyInfo();
            info.ID     = id;
            info.CnName = g.getString("CnName");
            info.EnName = g.getString("EnName");
            info.JpName = g.getString("JpName");
            info.Money  = g.getInt("Money");
            info.Lv     = g.getInt("Lv");
            info.Score  = g.getInt("Score");
            info.Gem    = g.getFloat("Gem");
            if (!dicEnemy.ContainsKey(id))
            {
                dicEnemy.Add(id, info);
            }
        }
        HasReadToMemory = true;
        Debug.Log("TableEnemyLoadDone!");
    }
Esempio n. 3
0
    public void Read()
    {
        XmlDocument xmldoc  = new XmlDocument();
        string      xmlText = xLoad("Parts");

        xmldoc.LoadXml(xmlText);
        XmlNodeList nodelist = xmldoc.SelectSingleNode("root").ChildNodes;

        foreach (XmlNode node in nodelist)
        {
            XmlAttributeCollection xAC = node.Attributes;
            GetAttribute           g   = new GetAttribute(xAC);
            int       id   = int.Parse(node.Name.Replace("ID", ""));
            PartsInfo info = new PartsInfo();
            info.ID        = id;
            info.CnName    = g.getString("CnName");
            info.ATK       = g.getInt("ATK");
            info.CnContent = g.getString("CnContent");
            info.EnName    = g.getString("EnName");
            info.EnContent = g.getString("EnContent");
            info.JpName    = g.getString("JpName");
            info.JpContent = g.getString("JpContent");
            info.Score     = g.getInt("Score");
            info.GemPrice  = g.getInt("GemPrice");
            info.HP        = g.getInt("HP");
            info.Mass      = g.getInt("Mass");
            info.Price     = g.getInt("Price");
            info.SPD       = g.getInt("SPD");
            info.Type      = g.getInt("Type");
            if (!dicParts.ContainsKey(id))
            {
                dicParts.Add(id, info);
            }
        }
        HasReadToMemory = true;
        Debug.Log("TablePartsLoadDone!");
    }