public override void Import(DCFG cfg) { LvlMonster data = cfg as LvlMonster; this.Id = data.Id; this.Pos = data.Pos; this.Euler = data.Euler; }
public override DCFG Export() { LvlMonster data = new LvlMonster(); data.Id = this.Id; data.Pos = this.Pos; data.Euler = this.Euler; return(data); }
IEnumerator AddMonster() { for (int i = 0; i < m_Config.Monsters.Count; i++) { LvlMonster mm = m_Config.Monsters[i]; KTransform bd = KTransform.Create(mm.Pos, mm.Euler); CharacterManager.Instance.AddMonster(mm.Id, bd); yield return(null); } }
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(); } }
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); }