Exemplo n.º 1
0
 bool CheckSpotMatch(LoadableItem desired, InventorySlot slot, int quantity)
 {
     if (desired == null || slot == null)
     {
         return(true);
     }
     else
     {
         return((desired.GetSrc() == slot.GetItem().GetSrc() && slot.CountItems() >= quantity) ||
                (desired.GetComponent <WeaponBase>() != null &&
                 slot.GetPrefab().GetComponent <WeaponBase>() != null &&
                 desired.GetComponent <PotionBase>() != null &&
                 slot.GetPrefab().GetComponent <PotionBase>() != null));
     }
 }