Пример #1
0
        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;
                }
            }
        }
Пример #2
0
        public override XmlObject Export()
        {
            MapMine data = new MapMine
            {
                Id            = Id,
                Position      = Position,
                EulerAngles   = Euler,
                RebornCD      = RebornCD,
                DropItemCount = DropItemCount
            };

            return(data);
        }
Пример #3
0
        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();
        }