Example #1
0
 public void AddItemToInventory(EquippableItem item)
 {
     if (inventory.Count < 12)
     {
         inventory.Add(item);
         if (inventoryUIManager)
         {
             inventoryUIManager.UpdateUI();
         }
         MessageSystem.Print($"{item.Name} was added to inventory");
     }
     else
     {
         MessageSystem.Print("Inventory is full.");
     }
 }
Example #2
0
 public override void TogglePanel()
 {
     base.TogglePanel();
     if (gameObject.activeSelf == true)
     {
         inventoryUIManager.gameObject.SetActive(true);
         inventoryUIManager.UpdateUI();
         inventoryButtonGO.SetActive(false);
     }
     else
     {
         inventoryUIManager.gameObject.SetActive(false);
     }
 }