Esempio n. 1
0
 public void Add(ManaType type, int amount = 1, ManaRestriction restriction = null)
 {
     for (int i = 0; i < amount; i++)
     {
         this.ManaFragments.Add(ManaFragment.Get(type, restriction));
     }
 }
Esempio n. 2
0
        public static ManaFragment Get(ManaType type, ManaRestriction restriction = null)
        {
            var          key = new Tuple <ManaType, ManaRestriction>(type, restriction);
            ManaFragment val;

            if (!_dict.TryGetValue(key, out val))
            {
                val        = new ManaFragment(type, restriction);
                _dict[key] = val;
            }
            return(val);
        }
Esempio n. 3
0
 public void Add(ManaFragment f)
 {
     this.ManaFragments.Add(f);
 }