/// <summary> /// Creates a copy of the wave. /// </summary> /// <returns>Returns the copy.</returns> public EncounterWave Copy() { EncounterWave ew = new EncounterWave(); ew.ID = fID; ew.Name = fName; ew.Active = fActive; foreach (EncounterSlot slot in fSlots) { ew.Slots.Add(slot.Copy()); } return(ew); }
public EncounterWave Copy() { EncounterWave encounterWave = new EncounterWave() { ID = this.fID, Name = this.fName, Active = this.fActive }; foreach (EncounterSlot fSlot in this.fSlots) { encounterWave.Slots.Add(fSlot.Copy()); } return(encounterWave); }
public EncounterWave FindWave(EncounterSlot slot) { EncounterWave encounterWave; List <EncounterWave> .Enumerator enumerator = this.fWaves.GetEnumerator(); try { while (enumerator.MoveNext()) { EncounterWave current = enumerator.Current; if (!current.Slots.Contains(slot)) { continue; } encounterWave = current; return(encounterWave); } return(null); } finally { ((IDisposable)enumerator).Dispose(); } }