public void transferItem() { if (displayInfo != null && inventory.itemList.Count < inventory.inventorySize) { goldenVault.vaultItems.Remove(displayInfo.gameObject); HubProperties.vaultItems.Remove(displayInfo.gameObject.name); inventory.itemList.Add(displayInfo.gameObject); inventory.UpdateUI(); goldenVault.UpdateUI(); } }
public void storeItemVault() { if (!Input.GetKeyDown(KeyCode.LeftShift) && displayInfo != null && inventory.vaultDisplay != null && inventory.vaultDisplay.activeSelf == true && HubProperties.vaultItems.Count < HubProperties.maxNumberVaultItems) { inventory.itemList.Remove(displayInfo.gameObject); if (displayInfo.goldValue <= 0) { goldenVault.vaultItems.Add(displayInfo.gameObject); HubProperties.vaultItems.Add(displayInfo.gameObject.name); FindObjectOfType <AudioManager>().PlaySound("Store Items Golden Vault"); } inventory.UpdateUI(); goldenVault.UpdateUI(); } }