Пример #1
0
 public bool AddPart(string partName)
 {
     for (int i = 0; i < parts.Length; i++)
     {
         if (partName == slotNames[i] && !parts[i])
         {
             parts[i] = (GameObject)Instantiate(invMng.GetPart(partName), partPositions[i], partRotations[i]);
             parts[i].transform.localScale = partScales[i];
             parts[i].transform.SetParent(transform);
             invMng.RefreshInventory();
             return(true);
         }
     }
     return(false);
 }