Esempio n. 1
0
        public CVehicleModPearlescentColors(XmlNode node)
        {
            XmlNode cnode;

            cnode = node.SelectSingleNode("baseCols");
            if (cnode != null)
            {
                var items = cnode.SelectNodes("Item");
                if (items.Count > 0)
                {
                    baseCols = new CVehicleModColor[items.Count];
                    for (int i = 0; i < items.Count; i++)
                    {
                        baseCols[i] = new CVehicleModColor(items[i]);
                    }
                }
            }
            cnode = node.SelectSingleNode("specCols");
            if (cnode != null)
            {
                var items = cnode.SelectNodes("Item");
                if (items.Count > 0)
                {
                    specCols = new CVehicleModColor[items.Count];
                    for (int i = 0; i < items.Count; i++)
                    {
                        specCols[i] = new CVehicleModColor(items[i]);
                    }
                }
            }
        }
Esempio n. 2
0
        public CVehicleModColours(XmlNode node)
        {
            XmlNode cnode;

            cnode = node.SelectSingleNode("metallic");
            if (cnode != null)
            {
                var items = cnode.SelectNodes("Item");
                if (items.Count > 0)
                {
                    metallic = new CVehicleModColor[items.Count];
                    for (int i = 0; i < items.Count; i++)
                    {
                        metallic[i] = new CVehicleModColor(items[i]);
                    }
                }
            }
            cnode = node.SelectSingleNode("classic");
            if (cnode != null)
            {
                var items = cnode.SelectNodes("Item");
                if (items.Count > 0)
                {
                    classic = new CVehicleModColor[items.Count];
                    for (int i = 0; i < items.Count; i++)
                    {
                        classic[i] = new CVehicleModColor(items[i]);
                    }
                }
            }
            cnode = node.SelectSingleNode("matte");
            if (cnode != null)
            {
                var items = cnode.SelectNodes("Item");
                if (items.Count > 0)
                {
                    matte = new CVehicleModColor[items.Count];
                    for (int i = 0; i < items.Count; i++)
                    {
                        matte[i] = new CVehicleModColor(items[i]);
                    }
                }
            }
            cnode = node.SelectSingleNode("metals");
            if (cnode != null)
            {
                var items = cnode.SelectNodes("Item");
                if (items.Count > 0)
                {
                    metals = new CVehicleModColor[items.Count];
                    for (int i = 0; i < items.Count; i++)
                    {
                        metals[i] = new CVehicleModColor(items[i]);
                    }
                }
            }
            cnode = node.SelectSingleNode("chrome");
            if (cnode != null)
            {
                var items = cnode.SelectNodes("Item");
                if (items.Count > 0)
                {
                    chrome = new CVehicleModColor[items.Count];
                    for (int i = 0; i < items.Count; i++)
                    {
                        chrome[i] = new CVehicleModColor(items[i]);
                    }
                }
            }
            cnode = node.SelectSingleNode("pearlescent");
            if (cnode != null)
            {
                pearlescent = new CVehicleModPearlescentColors(cnode);
            }
        }