private void GenChild(RootPerson parent1, Person parent2, int remainingChildren) { gender = Generators.ChildGender(parent1, parent2); age = Generators.ChildAge(parent1, parent2, remainingChildren); float det = Random.Range(0.0f, 1.0f); if (GenerationHelpers.SABMatch(parent1, parent2) || det <= 0.1f) { skinColor = Generators.RootSkinColor(); hairColor = Generators.RootHairColor(skinColor); eyeColor = Generators.RootEyeColor(skinColor); } else { } }
private void GenChild(RootPerson root, int remainingChildren) { gender = Generators.ChildGender(root); age = Generators.ChildAge(root, remainingChildren); float det = Random.Range(0.0f, 1.0f); if (det <= 2.0f / 3.0f) { skinColor = Generators.ChildSkinColor(root); hairColor = Generators.ChildHairColor(root); eyeColor = Generators.ChildEyeColor(root); } else { skinColor = Generators.RootSkinColor(); hairColor = Generators.RootHairColor(skinColor); eyeColor = Generators.RootEyeColor(skinColor); } }