示例#1
0
        /// <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);
        }
示例#2
0
        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);
        }
示例#3
0
        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();
            }
        }