public void OpenChest() { //Dialog Window on dialogBox.SetActive(true); //dilog text = contents text dialogText.text = contents.itemDescription; //add content to the inventory playerInventory.AddItem(contents); playerInventory.currentItem = contents; //raise the signal to the player to animate raiseItem.Raise(); //raise the content clue context.Raise(); isOpen = true; anim.SetBool("opened", true); }
public void changeAmount(int minusMon) { for (int i = 0; i < Inventory.slots.Count; i++) { if (Inventory.items[i].ID == -1) { if (money >= minusMon) { int v = 0; money = money - minusMon; if (minusMon == 750) { v = 0; } else if (minusMon == 850) { v = 1; } else if (minusMon == 925) { v = 2; } else if (minusMon == 1000) { v = 3; } else if (minusMon == 800) { v = 4; } Inventory.AddItem(v, 1.525879e-05f); break; } } } }