示例#1
0
        void IXmlSerializable.ReadXml(XmlReader reader)
        {
            reader.ReadStartElement();

            XmlAttributeOverrides attr = new XmlAttributeOverrides();

            attr.Add(typeof(SpotlightData), new XmlAttributes()
            {
                XmlType = new XmlTypeAttribute("Default")
            });
            Default = (SpotlightData) new XmlSerializer(typeof(SpotlightData), attr).Deserialize(reader);

            attr[typeof(SpotlightData)].XmlType = new XmlTypeAttribute("Helicopter");
            Helicopter = (SpotlightData) new XmlSerializer(typeof(SpotlightData), attr).Deserialize(reader);

            attr[typeof(SpotlightData)].XmlType = new XmlTypeAttribute("Boat");
            Boat = (SpotlightData) new XmlSerializer(typeof(SpotlightData), attr).Deserialize(reader);

            reader.ReadEndElement();
        }
示例#2
0
 internal BaseSpotlight(SpotlightData data)
 {
     Data     = data;
     shadowId = GetNewShadowId();
 }
示例#3
0
 internal BaseSpotlight(SpotlightData data)
 {
     Data     = data;
     shadowId = GenerateShadowId();
 }