示例#1
0
 public clsGame(frmGame frm, string gamepath, string AppPath) : this()
 {
     this.frm = frm;
     Path     = AppPath;
     doc      = new System.Xml.XmlDocument();
     doc.Load(gamepath);
     Name    = doc.SelectSingleNode("/xml/Game/title").InnerText;
     Version = doc.SelectSingleNode("/xml/Game/title").Attributes.GetNamedItem("version").Value;
     Zones   = new clsZones(this);
     Zones.LoadAll();
 }
示例#2
0
 public void setDrawDiscard(System.Xml.XmlNode n, clsZones zones)
 {
     System.Xml.XmlNode a = n.Attributes.GetNamedItem("drawto");
     if (a != null)
     {
         Drawto = zones[a.Value];
     }
     a = n.Attributes.GetNamedItem("discardto");
     if (a != null)
     {
         Discardto = zones[a.Value];
     }
     a = n.Attributes.GetNamedItem("drawfrom");
     if (a != null)
     {
         Drawfrom = zones[a.Value];
     }
     a = n.Attributes.GetNamedItem("refillfrom");
     if (a != null)
     {
         Refillfrom = zones[a.Value];
     }
 }