Exemplo 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));
     }
 }
Exemplo 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);
        }
Exemplo n.º 3
0
 public void Add(ManaFragment f)
 {
     this.ManaFragments.Add(f);
 }