void Randomize() { if (openMenu == "Body Slider") { uicreator.RandomizeBodySliders(); return; } if (openMenu == "Body Type") { uicreator.RandomizeBody(); uicreator.RandomizePart(SlotCategory.BodySkin); uicreator.RandomizeSkinColor(); return; } if (!isPartMenu) { return; } if (slotCategory == SlotCategory.MainHand || slotCategory == SlotCategory.OffHand) { uicreator.RandomizeWeapon(slotCategory, weaponCategory); uicreator.RandomizeColor(slotCategory); } else { uicreator.RandomizePart(slotCategory); uicreator.RandomizeColor(slotCategory); } }
public void Randomize() { List <SlotCategory> excludedparts = new List <SlotCategory>(); List <SlotCategory> excludedcolors = new List <SlotCategory>(); if (_uicreator == null) { _uicreator = this.GetComponentInParent <UICreator>(); } //randomize parts if (!bodyPartToggle.isOn) { excludedparts.AddRange(new List <SlotCategory>() { SlotCategory.SkinDetails, SlotCategory.BodySkin }); } else { _uicreator.RandomizeBody(); } if (!facePartToggle.isOn) { excludedparts.AddRange(_facecats); } if (!outfitPartToggle.isOn) { excludedparts.AddRange(_outfitcats); } if (!weaponPartToggle.isOn) { excludedparts.AddRange(_weaponcats); } if (bodySliderToggle.isOn) { _uicreator.RandomizeBodySliders(); } //randomize colors if (!bodyColorToggle.isOn) { excludedcolors.AddRange(new List <SlotCategory>() { SlotCategory.SkinDetails }); } else { _uicreator.RandomizeSkinColor(); } if (!faceColorToggle.isOn) { excludedcolors.AddRange(_facecats); } if (!outfitColorToggle.isOn) { excludedcolors.AddRange(_outfitcats); } if (!weaponColorToggle.isOn) { excludedcolors.AddRange(_weaponcats); } _uicreator.RandomizePart(excludedparts, packGroup.GetExcludedPacks()); _uicreator.RandomizeColor(excludedcolors.ToArray()); }