public void AddToStats(ItemScript item) { defense += item.GetDefenseBoost(); meeleAttack += item.GetMeeleBoost(); rangedAttack += item.GetRangedBoost(); hungerBoost += item.GetHungerBoost(); thirstBoost += item.GetThirstBoost(); }
public void SubtractFromStats(ItemScript item) { defense -= item.GetDefenseBoost(); meeleAttack -= item.GetMeeleBoost(); rangedAttack -= item.GetRangedBoost(); hungerBoost -= item.GetHungerBoost(); thirstBoost -= item.GetThirstBoost(); }
private void OnMouseDown() { if (itemViewDetailSpriteRenderer == null || cameraManager == null || spriteRenderer == null || item == null) { print("Error in InventoryItemDisplay OnMouseDown 43\n"); return; } itemViewDetailSpriteRenderer.sprite = item.GetSprite(); itemNameText.text = "Item Name: " + item.GetItemName(); defenseText.text = "Defense: " + item.GetDefenseBoost().ToString(); meeleText.text = "Meele Attack: " + item.GetMeeleBoost().ToString(); rangedText.text = "Ranged Attack: " + item.GetRangedBoost().ToString(); hungerText.text = "Hunger: " + item.GetHungerBoost().ToString(); thirstText.text = "Thirst: " + item.GetThirstBoost().ToString(); weightText.text = "Weight: " + item.GetItemWeight().ToString(); cameraManager.SendMessage("ActivateItemViewDetail"); equipItemButton.SetInventoryItemDisplay(this); }