Пример #1
0
 void Update()
 {
     if (Input.GetKeyDown(KeyCode.I))
     {
         if (!InventoryCaneva.panel.gameObject.activeInHierarchy)
         {
             InventoryCaneva.OpenInventory(Items);
         }
         else
         {
             if (CraftUI.isActive)
             {
                 CraftUI.StaticExit();
             }
             InventoryCaneva.Exit();
         }
     }
     if (Input.GetKeyDown(KeyCode.C) && InventoryCaneva.panel.gameObject.activeInHierarchy)
     {
         if (!CraftUI.isActive)
         {
             CraftUI.OpenCraftingUI();
         }
         else
         {
             CraftUI.StaticExit();
         }
     }
 }
Пример #2
0
 public void Exit()
 {
     if (CraftUI.isActive)
     {
         CraftUI.StaticExit();
     }
     panel.SetActive(false);
     panelPlayer.SetActive(false);
     _lastSelectedItem = -1;
 }