Example #1
0
        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);
        }
Example #2
0
        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);
            }
        }