예제 #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();
 }