コード例 #1
0
        public void AddToBagFromInventory(Item item, int counter)
        {
            ConsumableItems NonCon = (ConsumableItems)item;

            ChestSpace[counter] = null;
            AddToBag(NonCon);
        }
コード例 #2
0
 public void RemoveFromBag(ConsumableItems item)
 {
     for (int i = 0; i < Bag.Length; i++)
     {
         if (Bag[i] == item)
         {
             Bag[i] = null;
             break;
         }
     }
 }
コード例 #3
0
 public void AddToBag(ConsumableItems item)
 {
     for (int i = 0; i < Bag.Length; i++)
     {
         if (Bag[i] != null)
         {
             continue;
         }
         else
         {
             Bag[i] = item;
             break;
         }
     }
 }