예제 #1
0
    public void OpenCraftingTable()
    {
        if (craftingPanel.activeSelf)
        {
            CloseAllWindows();
        }
        else
        {
            CursorControll.UnlockCursor();
            HideHUD.Hide();
            CloseAllWindows();
            craftingPanel.SetActive(true);
            inventoryPanel.SetActive(true);
            craftingTier = 1;

            /*
             * foreach (Crafting.CraftingClass crft in craftingScript.craftItems)
             * {
             *  if (crft.tier == 1)
             *  {
             *      crft.btn.interactable = true;
             *  }
             * }
             */
        }
    }
예제 #2
0
 void OpenInventory()
 {
     if (inventoryPanel.activeSelf)
     {
         CloseAllWindows();
     }
     else
     {
         for (int i = 0; i < items.Count; i++)
         {
             if (items[i].item > 0)
             {
                 items[i].text.transform.parent.gameObject.SetActive(true);
             }
             else
             {
                 items[i].text.transform.parent.gameObject.SetActive(false);
             }
         }
         inventoryPanel.SetActive(true);
         craftingPanel.SetActive(true);
         foreach (Building.BuildingsClass build in buildingScript.buildings)
         {
             build.key = false;
         }
         CursorControll.UnlockCursor();
         foreach (ItemsClass itm in items)
         {
             itm.text.text = itm.item.ToString();
         }
         craftingTier = 0;
         HideHUD.Hide();
     }
 }
예제 #3
0
 public void OpenCampfire()
 {
     if (smeltingPanel.activeSelf)
     {
         CloseAllWindows();
     }
     else
     {
         CursorControll.UnlockCursor();
         HideHUD.Hide();
         CloseAllWindows();
         smeltingPanel.SetActive(true);
         inventoryPanel.SetActive(true);
     }
 }