コード例 #1
0
ファイル: Person.cs プロジェクト: ButterfishGames/TheGuild
    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);
        }
    }