Ejemplo n.º 1
0
        public static void Serialize(XmlWriter xWrite, Castable contents)
        {
            XmlSerializer           Writer = new XmlSerializer(contents.GetType());
            XmlSerializerNamespaces ns     = new XmlSerializerNamespaces();

            ns.Add("", "http://www.hybrasyl.com/XML/Actions");
            Writer.Serialize(xWrite, contents, ns);
        }
Ejemplo n.º 2
0
        public static Castable Deserialize(XmlReader reader, Castable contents = null)
        {
            if (contents == null)
            {
                contents = new Castable();
            }
            //reader.Settings.IgnoreWhitespace = false;
            XmlSerializer XmlSerial = new XmlSerializer(contents.GetType());

            if (XmlSerial.CanDeserialize(reader))
            {
                var xContents = XmlSerial.Deserialize(reader);
                contents = (Castable)xContents;
            }
            return(contents);
        }
Ejemplo n.º 3
0
 public override void Attack(Castable castObject)
 {
     //do monster aoe
 }