public XElement ToXml( ) { return(new XElement( @"Layer", new XAttribute(@"Name", Name), _properties.SerializeToXml( ), Behaviours.ToXml( ), new XElement(@"Editors", Items.Select(i => i.ToXml( ))))); }
public virtual XElement ToXml( ) { return(new XElement( @"Editor", new XAttribute(@"ClrTypeOfEditor", GetType( ).AssemblyQualifiedName), // we need to write the properties type so that in-game component can recreate them new XAttribute(@"ClrTypeOfProperties", ItemProperties.GetType( ).AssemblyQualifiedName), new XAttribute(@"Name", Name), ItemProperties.SerializeToXml( ), Behaviours.ToXml( ) )); }
public XElement ToXml( ) { var xml = new XElement( new XElement( @"Level", _properties.SerializeToXml( ), Behaviours.ToXml( ), new XElement( @"Layers", Layers.Select(l => l.ToXml( ))) )); TypeLookup.Compress(xml); return(xml); }