private void DefineSlots(UMACrowdRandomSet.CrowdRaceData race) { Color skinColor; Color HairColor; Color Shine = Color.black; if (SkinColors != null) { OverlayColorData ocd = SkinColors.colors[Random.Range(0, SkinColors.colors.Length)]; skinColor = ocd.color; Shine = ocd.channelAdditiveMask[2]; } else { float skinTone = Random.Range(0.1f, 0.6f); skinColor = new Color(skinTone + Random.Range(0.35f, 0.4f), skinTone + Random.Range(0.25f, 0.4f), skinTone + Random.Range(0.35f, 0.4f), 1); } if (HairColors != null) { HairColor = HairColors.colors[Random.Range(0, HairColors.colors.Length)].color; } else { HairColor = new Color(Random.Range(0.1f, 0.9f), Random.Range(0.1f, 0.9f), Random.Range(0.1f, 0.9f), 1.0f); } var keywordsLookup = new HashSet <string>(keywords); UMACrowdRandomSet.Apply(umaData, race, skinColor, HairColor, Shine, keywordsLookup, GetSlotLibrary(), GetOverlayLibrary()); }
private void DefineSlots(UMACrowdRandomSet.CrowdRaceData race) { float skinTone = Random.Range(0.1f, 0.6f); Color skinColor = new Color(skinTone + Random.Range(0.35f, 0.4f), skinTone + Random.Range(0.25f, 0.4f), skinTone + Random.Range(0.35f, 0.4f), 1); Color HairColor = new Color(Random.Range(0.1f, 0.9f), Random.Range(0.1f, 0.9f), Random.Range(0.1f, 0.9f), Random.Range(0.1f, 0.5f)); var keywordsLookup = new HashSet <string>(keywords); UMACrowdRandomSet.Apply(umaData, race, skinColor, HairColor, keywordsLookup, slotLibrary, overlayLibrary); }