// Update is called once per frame void Update() { #region QuickSlot // if a item is selected in the inventory put it on the pressed quickSlot if (inventory.itemSelected) { if (Input.GetButtonDown("QuickSlotUp")) { quickSlots.SetItem(0); inventory.itemSelected = false; } if (Input.GetButtonDown("QuickSlotRight")) { quickSlots.SetItem(1); inventory.itemSelected = false; } if (Input.GetButtonDown("QuickSlotDown")) { quickSlots.SetItem(2); inventory.itemSelected = false; } if (Input.GetButtonDown("QuickSlotLeft")) { quickSlots.SetItem(3); inventory.itemSelected = false; } } #endregion if (Input.GetButtonDown("Inventory")) { Close(); pc.enabled = true; } }