Example #1
0
 public bool Add(SpellBuilder spell)
 {
     if (this.spells.Contains(spell))
     {
         return(false);
     }
     else
     {
         this.spells.Add(spell);
         spell.RegisterView(spellSecondaryView);
         NotifyAdd();
         return(true);
     }
 }
Example #2
0
        public SpellBuilder[] ToArray()
        {
            if (this.Count > 0)
            {
                var res = new SpellBuilder[this.Count];
                for (int i = 0; i < this.Count; i++)
                {
                    res[i] = this[i];
                }
                return(res);
            }

            return(new SpellBuilder[] { });
        }
Example #3
0
 public SpellBuilder Remove(SpellBuilder spell)
 {
     NotifyAdd();
     return(RemoveAt(this.spells.IndexOf(spell)));
 }
Example #4
0
 public bool Contains(SpellBuilder spell)
 {
     return(this.spells.Contains(spell));
 }