Пример #1
0
 /// <summary>
 /// Sets any wardrobe slot. If a negative value is passed, then the slot is cleared.
 /// </summary>
 /// <param name="slotToChange">name of the wordrobe slot to change</param>
 /// <param name="fSlotNumber">Id number slot to change</param>
 public void SetSlot(string slotToChange, float fSlotNumber)
 {
     if (slotToChange == "WardrobeCollection")
     {
         SetWardrobeCollectionSlot(slotToChange, fSlotNumber);
     }
     else
     {
         var           thisRace   = Avatar.activeRace.name;
         int           slotNumber = (int)fSlotNumber;
         UMATextRecipe tr         = null;
         if (slotNumber >= 0)
         {
             tr = characterSystem.Recipes[thisRace][slotToChange][slotNumber];
             Debug.Log(tr.name);
             Avatar.SetSlot(tr);
         }
         else
         {
             Avatar.ClearSlot(slotToChange);
             Avatar.ReapplyWardrobeCollections();
         }
     }
     Avatar.BuildCharacter(true);
     //Update the dropdowns to reflect any changes after the character has built
     SetUpWardrobeDropdowns();
 }