public override DCFG Export()
        {
            LvlRegionWave data = new LvlRegionWave();

            data.Id = this.Id;
            data.Events.AddRange(Events);
            List <LevelWave> list = Elements;

            for (int i = 0; i < list.Count; i++)
            {
                LevelWave m = list[i];
                LvlWave   d = (LvlWave)m.Export();
                data.Waves.Add(d);
            }
            return(data);
        }
        public override void Import(DCFG cfg)
        {
            LvlRegionWave data = cfg as LvlRegionWave;

            this.Id = data.Id;
            this.Events.Clear();
            this.Events.AddRange(data.Events);
            for (int i = 0; i < data.Waves.Count; i++)
            {
                LvlWave   d = data.Waves[i];
                LevelWave m = this.AddElement();
                m.Import(d);
                m.DrawScene();
                m.SetName();
                m.SetParentGroup(this);
            }
        }
Beispiel #3
0
        public override void Import(DCFG cfg)
        {
            LvlWave data = cfg as LvlWave;

            this.Id        = data.Id;
            this.IndexName = data.IndexName;
            this.Spawn     = data.Spawn;
            this.Delay     = data.Delay;
            this.AddBuffID = data.AddBuffID;
            for (int i = 0; i < data.Monsters.Count; i++)
            {
                LvlMonster   d = data.Monsters[i];
                LevelMonster m = this.AddElement();
                m.Import(d);
                m.DrawScene();
                m.SetName();
            }
        }
Beispiel #4
0
        public override DCFG Export()
        {
            LvlWave data = new LvlWave();

            data.Id        = this.Id;
            data.IndexName = string.IsNullOrEmpty(data.IndexName) ? string.Format("第{0}波", this.Id) : this.IndexName;
            data.Spawn     = this.Spawn;
            data.Delay     = this.Delay;
            data.AddBuffID = this.AddBuffID;
            List <LevelMonster> list = Elements;

            for (int i = 0; i < list.Count; i++)
            {
                LevelMonster m = list[i];
                LvlMonster   d = (LvlMonster)m.Export();
                data.Monsters.Add(d);
            }
            return(data);
        }