Esempio n. 1
0
 public XElement ToXml( )
 {
     return(new XElement(
                @"Layer",
                new XAttribute(@"Name", Name),
                _properties.SerializeToXml( ),
                Behaviours.ToXml(  ),
                new XElement(@"Editors", Items.Select(i => i.ToXml( )))));
 }
Esempio n. 2
0
 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( )
                ));
 }
Esempio n. 3
0
        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);
        }