예제 #1
0
 public void AddToStats(ItemScript item)
 {
     defense      += item.GetDefenseBoost();
     meeleAttack  += item.GetMeeleBoost();
     rangedAttack += item.GetRangedBoost();
     hungerBoost  += item.GetHungerBoost();
     thirstBoost  += item.GetThirstBoost();
 }
예제 #2
0
 public void SubtractFromStats(ItemScript item)
 {
     defense      -= item.GetDefenseBoost();
     meeleAttack  -= item.GetMeeleBoost();
     rangedAttack -= item.GetRangedBoost();
     hungerBoost  -= item.GetHungerBoost();
     thirstBoost  -= item.GetThirstBoost();
 }
예제 #3
0
 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);
 }