Beispiel #1
0
 public void DropAllOfType(CollectibleItem.ItemType itemType, DropHandler handler = null)
 {
     if (handler != null)
     {
         foreach (CollectibleItem item in items.FindAll(i => i.itemType == itemType))
         {
             Drop(item, handler);
         }
     }
 }
Beispiel #2
0
 void UpdateInventoryLabel(CollectibleItem.ItemType itemType, int change)
 {
     if (itemType == CollectibleItem.ItemType.ShroomItem)
     {
         magicItemCount     += change;
         magicItemLabel.text = "x" + magicItemCount;
     }
     else if (itemType == CollectibleItem.ItemType.Firewood)
     {
         fireWoodCount     += change;
         fireWoodLabel.text = "x" + fireWoodCount;
     }
 }
Beispiel #3
0
    public bool DropOneOfType(CollectibleItem.ItemType itemType, DropHandler handler = null)
    {
        CollectibleItem item = items.Find(i => i.itemType == itemType);

        return(Drop(item, handler));
    }