public override void Read(XmlElement os) { this.Id = os.GetInt32("Id"); this.IndexName = os.GetString("IndexName"); this.Delay = os.GetFloat("Delay"); this.Spawn = (ELvlMonsterWaveSpawn)os.GetInt32("Spawn"); this.AddBuffID = os.GetInt32("AddBuffID"); this.Monsters = ReadListFromChildAttribute <LvlMonster>(os, "Monsters"); }
public override void DrawGUI() { #if UNITY_EDITOR this.Id = UnityEditor.EditorGUILayout.IntField("Index", Id); this.IndexName = UnityEditor.EditorGUILayout.TextField("IndexName", IndexName); this.Delay = UnityEditor.EditorGUILayout.FloatField("Delay", Delay); this.Spawn = (ELvlMonsterWaveSpawn)UnityEditor.EditorGUILayout.EnumPopup("Spawn", Spawn); this.AddBuffID = UnityEditor.EditorGUILayout.IntField("AddBuffID", AddBuffID); this.SetName(); #endif }
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(); } }