public override void Read(XmlNode os) { foreach (XmlNode current in XmlObject.GetChilds(os)) { switch (current.Name) { case "Id": this.Id = ReadInt(current); break; case "RegionID": this.RegionID = ReadInt(current); break; case "Mines": XmlObject.GetChilds(current).ForEach(delegate(XmlNode pNode) { MapMine data = new MapMine(); data.Read(pNode); this.Mines.Add(data); }); break; } } }
public override XmlObject Export() { MapMine data = new MapMine { Id = Id, Position = Position, EulerAngles = Euler, RebornCD = RebornCD, DropItemCount = DropItemCount }; return(data); }
public override void Import(XmlObject pData, bool pBuild) { MapMine data = pData as MapMine; if (data != null) { Id = data.Id; Position = data.Position; Euler = data.EulerAngles; RebornCD = data.RebornCD; DropItemCount = data.DropItemCount; } this.Build(); this.SetName(); }