예제 #1
0
    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);
        }
    }