示例#1
0
 public void InitializeCategoryBoxes(int categorySlot)
 {
     for (int i = 0; i < CategoryBoxes.Length; i++)
     {
         ItemCategory iC = CategoryBoxes[i].GetComponent <ItemCategory>();
         if (CategoryArrayName.ElementAtOrDefault(i) != null)
         {
             iC.CategoryName = CategoryArrayName[i];
             iC.GenerateImage();
             if (i == categorySlot)
             {
                 InitializeItemsToCraft(iC.CategoryName);
                 SetItemInfo(Instance.CurrentItem);
             }
         }
         else
         {
             iC.HideSprite();
         }
     }
 }