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(); }
internal BaseSpotlight(SpotlightData data) { Data = data; shadowId = GetNewShadowId(); }
internal BaseSpotlight(SpotlightData data) { Data = data; shadowId = GenerateShadowId(); }