示例#1
0
        public Chibi GetChibiFromChibiGenes(ChibiGenes genes, bool isMale)
        {
            int   skinColor = GetIndexFromGeneCode("skin", genes.SkinColor, isMale);
            int   eyesColor = GetIndexFromGeneCode("eyes", genes.EyesColor, isMale);
            int   eyebrows  = Constants.EYEBROWS_INDEX;
            int   hair;
            int   backHair;
            Color hairColor = GetColorFromGeneCode(genes.HairColor);
            int   mouth     = GetIndexFromGeneCode("mouth", genes.Mouth, isMale);

            if (isMale)
            {
                hair     = Constants.MALE_MIDHAIR_INDEX;
                backHair = Constants.MALE_BACKHAIR_INDEX;
            }
            else
            {
                hair     = Constants.FEMALE_MIDHAIR_INDEX;
                backHair = Constants.FEMALE_BACKHAIR_INDEX;
            }

            Chibi chibi = new Chibi(skinColor, eyesColor, eyebrows, hair, backHair, hairColor, mouth);

            return(chibi);
        }
示例#2
0
    private void GetCharacters()
    {
        int fatherIndex = gameManager.GetFather();

        fatherGenes = Parents.FATHER_GENES[fatherIndex];
        int motherIndex = gameManager.GetMother();

        motherGenes = Parents.MOTHER_GENES[motherIndex];
        childGenes  = gameManager.GetChildFromList(childIndex);
    }
示例#3
0
    private void GetParentsGenes()
    {
        int        fatherIndex = gameManager.GetFather();
        ChibiGenes fatherGenes = Parents.FATHER_GENES[fatherIndex];

        fatherCodes = new List <string>();
        int        motherIndex = gameManager.GetMother();
        ChibiGenes motherGenes = Parents.MOTHER_GENES[motherIndex];

        motherCodes = new List <string>();

        SplitGenePair(fatherGenes.SkinColor, fatherCodes);
        SplitGenePair(fatherGenes.EyesColor, fatherCodes);
        SplitGenePair(fatherGenes.HairColor, fatherCodes);
        SplitGenePair(fatherGenes.Mouth, fatherCodes);
        SplitGenePair(fatherGenes.Gender, fatherCodes);

        SplitGenePair(motherGenes.SkinColor, motherCodes);
        SplitGenePair(motherGenes.EyesColor, motherCodes);
        SplitGenePair(motherGenes.HairColor, motherCodes);
        SplitGenePair(motherGenes.Mouth, motherCodes);
        SplitGenePair(motherGenes.Gender, motherCodes);
    }