Exemplo n.º 1
0
        private void ShowHairdresserMenuEvent(object[] args)
        {
            // Get the variables from the arguments
            int    sex          = Convert.ToInt32(args[0]);
            string skinJson     = args[1].ToString();
            string businessName = args[2].ToString();

            // Add the options
            string faceOption = JsonConvert.SerializeObject(sex == Constants.SEX_MALE ? Constants.MALE_FACE_OPTIONS : Constants.FEMALE_FACE_OPTIONS);

            // Initialize the face values
            initialHair = JsonConvert.DeserializeObject <FacialHair>(skinJson);

            facialHair = new List <int>();
            facialHair.Add(initialHair.hairModel);
            facialHair.Add(initialHair.firstHairColor);
            facialHair.Add(initialHair.secondHairColor);
            facialHair.Add(initialHair.eyebrowsModel);
            facialHair.Add(initialHair.eyebrowsColor);
            facialHair.Add(initialHair.beardModel);
            facialHair.Add(initialHair.beardColor);

            // Create hairdressers' menu
            Browser.CreateBrowserEvent(new object[] { "package://statics/html/sideMenu.html", "populateHairdresserMenu", faceOption, JsonConvert.SerializeObject(facialHair), businessName });
        }
Exemplo n.º 2
0
 public CharacterAppearance()
 {
     HairColor  = new HairColor("none");
     HairStyle  = new HairStyle("none");
     FacialHair = new FacialHair("none");
     EyeColor   = new EyeColor("none");
 }
Exemplo n.º 3
0
 public FaceData(double age, string gender, double smile, FacialHair facialHair, EmotionScores emotion)
 {
     this.id         = NewID();
     this.Age        = age;
     this.Gender     = gender;
     this.Smile      = smile;
     this.FacialHair = facialHair;
     this.Emotion    = emotion;
 }
Exemplo n.º 4
0
 public FaceFormatter(Face face)
 {
     attributes = face.FaceAttributes;
     age        = attributes.Age;
     gender     = attributes.Gender;
     smile      = attributes.Smile;
     facialHair = attributes.FacialHair;
     headPose   = attributes.HeadPose;
     glasses    = attributes.Glasses;
     pos        = face.FaceRectangle.Left + face.FaceRectangle.Width / 2;
 }
Exemplo n.º 5
0
        private void ApplyHairdresserChangesEvent(object[] args)
        {
            FacialHair generatedFace = new FacialHair();

            generatedFace.hairModel       = facialHair[0];
            generatedFace.firstHairColor  = facialHair[1];
            generatedFace.secondHairColor = facialHair[2];
            generatedFace.eyebrowsModel   = facialHair[3];
            generatedFace.eyebrowsColor   = facialHair[4];
            generatedFace.beardModel      = facialHair[5];
            generatedFace.beardColor      = facialHair[6];

            Events.CallRemote("changeHairStyle", JsonConvert.SerializeObject(generatedFace));
        }
Exemplo n.º 6
0
        /// <summary>
        /// Returns the name and confidence of top facial hair. Possible values: Beard | Moustache
        /// Returns "Beard" and 0 when none found.
        /// </summary>
        /// <returns>name, confidence</returns>
        private static Tuple <string, double> GetTopFacialHair(FacialHair input)
        {
            if (input.Beard >= input.Moustache)
            {
                return(new Tuple <string, double>("Beard", input.Beard));
            }

            if (input.Moustache > input.Beard)
            {
                return(new Tuple <string, double>("Moustache", input.Moustache));
            }

            return(new Tuple <string, double>("Beard", 0));
        }
Exemplo n.º 7
0
        public static double CalculateFacialHair(this FacialHair facialHair)
        {
            double hair = (facialHair.Beard + facialHair.Moustache + facialHair.Sideburns) / 3;

            if (hair == 0)
            {
                return(0);
            }
            else if (hair < 0.5)
            {
                return(0.5);
            }
            else
            {
                return(1);
            }
        }
Exemplo n.º 8
0
        private void ApplyHairdresserChangesEvent(object[] args)
        {
            FacialHair generatedFace = new FacialHair();

            generatedFace.hairModel       = facialHair[0];
            generatedFace.firstHairColor  = facialHair[1];
            generatedFace.secondHairColor = facialHair[2];
            generatedFace.eyebrowsModel   = facialHair[3] < 0 || facialHair[3] > 255 ? 255 : facialHair[3];
            generatedFace.eyebrowsColor   = facialHair[4];
            generatedFace.beardModel      = facialHair[5] < 0 || facialHair[5] > 255 ? 255 : facialHair[5];
            generatedFace.beardColor      = facialHair[6];

            // Make the default camera active
            RAGE.Game.Cam.DestroyCam(customCamera, true);
            RAGE.Game.Cam.RenderScriptCams(false, false, 0, true, false, 0);

            Events.CallRemote("changeHairStyle", JsonConvert.SerializeObject(generatedFace));
        }
        private async Task <bool> SubjectSummary(DetectiveBotContext context)
        {
            bool result = false;

            bool.TryParse(context.Request.Text, out result);

            FacialHair = result;

            await context.SendActivity(context.Request.CreateReply($"Ok Suspect description is:"));

            await context.SendActivity(context.Request.CreateReply($"Age: {Age}"));

            await context.SendActivity(context.Request.CreateReply($"Sex {Sex}"));

            await context.SendActivity(context.Request.CreateReply($"Hair color: {HairColor}"));

            await context.SendActivity(context.Request.CreateReply($"Facial Hair {FacialHair.ToString()}"));

            State = TopicState.checkSuspectPicture;

            return(await ContinueTopic(context));
        }
Exemplo n.º 10
0
        private void ShowHairdresserMenuEvent(object[] args)
        {
            // Get the variables from the arguments
            int    sex          = Convert.ToInt32(args[0]);
            string skinJson     = args[1].ToString();
            string businessName = args[2].ToString();

            // Add the options
            string faceOption = JsonConvert.SerializeObject(sex == Constants.SEX_MALE ? Constants.MALE_FACE_OPTIONS : Constants.FEMALE_FACE_OPTIONS);

            // Initialize the face values
            initialHair = JsonConvert.DeserializeObject <FacialHair>(skinJson);

            facialHair = new List <int>();
            facialHair.Add(initialHair.hairModel);
            facialHair.Add(initialHair.firstHairColor);
            facialHair.Add(initialHair.secondHairColor);
            facialHair.Add(initialHair.eyebrowsModel);
            facialHair.Add(initialHair.eyebrowsColor);
            facialHair.Add(initialHair.beardModel);
            facialHair.Add(initialHair.beardColor);

            // Create a custom camera
            float forwardX = Player.LocalPlayer.Position.X + (Player.LocalPlayer.GetForwardX() * 1.5f);
            float forwardY = Player.LocalPlayer.Position.Y + (Player.LocalPlayer.GetForwardY() * 1.5f);

            customCamera = RAGE.Game.Cam.CreateCamera(RAGE.Game.Misc.GetHashKey("DEFAULT_SCRIPTED_CAMERA"), true);
            RAGE.Game.Cam.SetCamCoord(customCamera, forwardX, forwardY, Player.LocalPlayer.Position.Z + 0.5f);
            RAGE.Game.Cam.PointCamAtCoord(customCamera, Player.LocalPlayer.Position.X, Player.LocalPlayer.Position.Y, Player.LocalPlayer.Position.Z);

            // Enable the camera
            RAGE.Game.Cam.SetCamActive(customCamera, true);
            RAGE.Game.Cam.RenderScriptCams(true, false, 0, true, false, 0);

            // Create hairdressers' menu
            Browser.CreateBrowserEvent(new object[] { "package://statics/html/sideMenu.html", "populateHairdresserMenu", faceOption, JsonConvert.SerializeObject(facialHair), businessName });
        }
Exemplo n.º 11
0
        internal static String GetTargetGroup(double exactAge, String gender, Microsoft.ProjectOxford.Face.Contract.Glasses glasses, FacialHair facialHair, EmotionScores emotion, double smile)
        {
            //Hackathon: prepare the Target-Group-String for the Hybris REST call: HybrisRest.GetHybrisData(Target-Group-String)
            String prefix         = "MRO-";
            String genderSyllable = gender.ToLower().StartsWith("m") ? "M" : "F";
            String ageGroup       = "";

            Console.WriteLine("Smile: " + smile);

            if (smile > 0.9999)
            {
                return(prefix + "X-EM-S");
            }

            Console.WriteLine("Anger: " + emotion.Anger);
            Console.WriteLine("Contempt: " + emotion.Contempt);
            Console.WriteLine("Disgust: " + emotion.Disgust);
            Console.WriteLine("Fear: " + emotion.Fear);
            Console.WriteLine("Happiness: " + emotion.Happiness);
            Console.WriteLine("Neutral: " + emotion.Neutral);
            Console.WriteLine("Sadness: " + emotion.Sadness);
            Console.WriteLine("Surprise: " + emotion.Surprise);

            if (emotion.Anger > 0.5)
            {
                return(prefix + "X-EM-A");
            }

            if ((int)glasses == 1)
            {
                return(prefix + genderSyllable + "-SG--");
            }
            else if ((int)glasses == 2)
            {
                return(prefix + genderSyllable + "-RG--");
            }

            Console.WriteLine("Beard: " + facialHair.Beard);
            Console.WriteLine("Moustache: " + facialHair.Moustache);
            Console.WriteLine("Sideburns: " + facialHair.Sideburns);
            if (genderSyllable.Equals("M") && facialHair.Beard > 0.5)
            {
                return(prefix + genderSyllable + "-FH-B");
            }

            if (exactAge < 20)
            {
                ageGroup = "00-20";
            }
            else if (exactAge < 40)
            {
                ageGroup = "20-40";
            }
            else if (exactAge < 60)
            {
                ageGroup = "40-60";
            }
            else
            {
                ageGroup = "40-60";
                Console.WriteLine("Error regarding Agegroup: " + exactAge + " is bigger than 60");
                Console.WriteLine("Error regarding Agegroup: Changing to agegroup 40-60");
            }
            Console.WriteLine("Result of GetTargetGroup: ", prefix + genderSyllable + ageGroup);
            return(prefix + genderSyllable + ageGroup);
        }
Exemplo n.º 12
0
        // randomization method based on previously selected variables
        void RandomizeByVariable(CharacterObjectGroups cog, Gender gender, Elements elements, Race race, FacialHair facialHair, SkinColor skinColor, HeadCovering headCovering)
        {
            // if facial elements are enabled
            switch (elements)
            {
            case Elements.Yes:
                //select head with all elements
                if (cog.headAllElements.Count != 0)
                {
                    ActivateItem(cog.headAllElements[Random.Range(0, cog.headAllElements.Count)]);
                }

                //select eyebrows
                if (cog.eyebrow.Count != 0)
                {
                    ActivateItem(cog.eyebrow[Random.Range(0, cog.eyebrow.Count)]);
                }

                //select facial hair (conditional)
                if (cog.facialHair.Count != 0 && facialHair == FacialHair.Yes && gender == Gender.Male && headCovering != HeadCovering.HeadCoverings_No_FacialHair)
                {
                    ActivateItem(cog.facialHair[Random.Range(0, cog.facialHair.Count)]);
                }

                // select hair attachment
                switch (headCovering)
                {
                case HeadCovering.HeadCoverings_Base_Hair:
                    // set hair attachment to index 1
                    if (allGender.all_Hair.Count != 0)
                    {
                        ActivateItem(allGender.all_Hair[1]);
                    }
                    if (allGender.headCoverings_Base_Hair.Count != 0)
                    {
                        ActivateItem(allGender.headCoverings_Base_Hair[Random.Range(0, allGender.headCoverings_Base_Hair.Count)]);
                    }
                    break;

                case HeadCovering.HeadCoverings_No_FacialHair:
                    // no facial hair attachment
                    if (allGender.all_Hair.Count != 0)
                    {
                        ActivateItem(allGender.all_Hair[Random.Range(0, allGender.all_Hair.Count)]);
                    }
                    if (allGender.headCoverings_No_FacialHair.Count != 0)
                    {
                        ActivateItem(allGender.headCoverings_No_FacialHair[Random.Range(0, allGender.headCoverings_No_FacialHair.Count)]);
                    }
                    break;

                case HeadCovering.HeadCoverings_No_Hair:
                    // select hair attachment
                    if (allGender.headCoverings_No_Hair.Count != 0)
                    {
                        ActivateItem(allGender.all_Hair[Random.Range(0, allGender.all_Hair.Count)]);
                    }
                    // if not human
                    if (race != Race.Human)
                    {
                        // select elf ear attachment
                        if (allGender.elf_Ear.Count != 0)
                        {
                            ActivateItem(allGender.elf_Ear[Random.Range(0, allGender.elf_Ear.Count)]);
                        }
                    }
                    break;
                }
                break;

            case Elements.No:
                //select head with no elements
                if (cog.headNoElements.Count != 0)
                {
                    ActivateItem(cog.headNoElements[Random.Range(0, cog.headNoElements.Count)]);
                }
                break;
            }

            // select torso starting at index 1
            if (cog.torso.Count != 0)
            {
                ActivateItem(cog.torso[Random.Range(1, cog.torso.Count)]);
            }

            // determine chance for upper arms to be different and activate
            if (cog.arm_Upper_Right.Count != 0)
            {
                RandomizeLeftRight(cog.arm_Upper_Right, cog.arm_Upper_Left, 15);
            }

            // determine chance for lower arms to be different and activate
            if (cog.arm_Lower_Right.Count != 0)
            {
                RandomizeLeftRight(cog.arm_Lower_Right, cog.arm_Lower_Left, 15);
            }

            // determine chance for hands to be different and activate
            if (cog.hand_Right.Count != 0)
            {
                RandomizeLeftRight(cog.hand_Right, cog.hand_Left, 15);
            }

            // select hips starting at index 1
            if (cog.hips.Count != 0)
            {
                ActivateItem(cog.hips[Random.Range(1, cog.hips.Count)]);
            }

            // determine chance for legs to be different and activate
            if (cog.leg_Right.Count != 0)
            {
                RandomizeLeftRight(cog.leg_Right, cog.leg_Left, 15);
            }

            // select chest attachment
            if (allGender.chest_Attachment.Count != 0)
            {
                ActivateItem(allGender.chest_Attachment[Random.Range(0, allGender.chest_Attachment.Count)]);
            }

            // select back attachment
            if (allGender.back_Attachment.Count != 0)
            {
                ActivateItem(allGender.back_Attachment[Random.Range(0, allGender.back_Attachment.Count)]);
            }

            // determine chance for shoulder attachments to be different and activate
            if (allGender.shoulder_Attachment_Right.Count != 0)
            {
                RandomizeLeftRight(allGender.shoulder_Attachment_Right, allGender.shoulder_Attachment_Left, 10);
            }

            // determine chance for elbow attachments to be different and activate
            if (allGender.elbow_Attachment_Right.Count != 0)
            {
                RandomizeLeftRight(allGender.elbow_Attachment_Right, allGender.elbow_Attachment_Left, 10);
            }

            // select hip attachment
            if (allGender.hips_Attachment.Count != 0)
            {
                ActivateItem(allGender.hips_Attachment[Random.Range(0, allGender.hips_Attachment.Count)]);
            }

            // determine chance for knee attachments to be different and activate
            if (allGender.knee_Attachement_Right.Count != 0)
            {
                RandomizeLeftRight(allGender.knee_Attachement_Right, allGender.knee_Attachement_Left, 10);
            }

            // start randomization of the random characters colors
            RandomizeColors(skinColor);
        }
Exemplo n.º 13
0
        // character randomization method
        void Randomize()
        {
            // initialize settings
            Gender       gender       = Gender.Male;
            Race         race         = Race.Human;
            SkinColor    skinColor    = SkinColor.White;
            Elements     elements     = Elements.Yes;
            HeadCovering headCovering = HeadCovering.HeadCoverings_Base_Hair;
            FacialHair   facialHair   = FacialHair.Yes;

            // disable any enabled objects before clear
            if (enabledObjects.Count != 0)
            {
                foreach (GameObject g in enabledObjects)
                {
                    g.SetActive(false);
                }
            }

            // clear enabled objects list (all objects now disabled)
            enabledObjects.Clear();

            // roll for gender
            if (!GetPercent(50))
            {
                gender = Gender.Female;
            }

            // roll for human (70% chance, 30% chance for elf)
            if (!GetPercent(70))
            {
                race = Race.Elf;
            }

            // roll for facial elements (beard, eyebrows)
            if (!GetPercent(50))
            {
                elements = Elements.No;
            }

            // select head covering 33% chance for each
            int headCoveringRoll = Random.Range(0, 100);

            // HeadCoverings_Base_Hair
            if (headCoveringRoll <= 33)
            {
                headCovering = HeadCovering.HeadCoverings_Base_Hair;
            }
            // HeadCoverings_No_FacialHair
            if (headCoveringRoll > 33 && headCoveringRoll < 66)
            {
                headCovering = HeadCovering.HeadCoverings_No_FacialHair;
            }
            // HeadCoverings_No_Hair
            if (headCoveringRoll >= 66)
            {
                headCovering = HeadCovering.HeadCoverings_No_Hair;
            }

            // select skin color if human, otherwise set skin color to elf
            switch (race)
            {
            case Race.Human:
                // select human skin 33% chance for each
                int colorRoll = Random.Range(0, 100);
                // select white skin
                if (colorRoll <= 33)
                {
                    skinColor = SkinColor.White;
                }
                // select brown skin
                if (colorRoll > 33 && colorRoll < 66)
                {
                    skinColor = SkinColor.Brown;
                }
                // select black skin
                if (colorRoll >= 66)
                {
                    skinColor = SkinColor.Black;
                }
                break;

            case Race.Elf:
                // select elf skin
                skinColor = SkinColor.Elf;
                break;
            }

            //roll for gender
            switch (gender)
            {
            case Gender.Male:
                // roll for facial hair if male
                if (!GetPercent(50))
                {
                    facialHair = FacialHair.No;
                }

                // initialize randomization
                RandomizeByVariable(male, gender, elements, race, facialHair, skinColor, headCovering);
                break;

            case Gender.Female:

                // no facial hair if female
                facialHair = FacialHair.No;

                // initialize randomization
                RandomizeByVariable(female, gender, elements, race, facialHair, skinColor, headCovering);
                break;
            }
        }
Exemplo n.º 14
0
    public void RandomizeBody()
    {
#if (UNITY_EDITOR)
        InitBody();
#endif

        // initialize settings
        Gender gender = Gender.Male;
        race = Race.Human;
        Elements     elements     = Elements.Yes;
        HeadCovering headCovering = HeadCovering.HeadCoverings_Base_Hair;
        FacialHair   facialHair   = FacialHair.Yes;

        // roll for gender
        if (!GetPercent(50))
        {
            gender = Gender.Female;
        }

        // roll for human (70% chance, 30% chance for elf)
        if (!GetPercent(70))
        {
            race = Race.Elf;
        }

        // roll for facial elements (beard, eyebrows)
        if (!GetPercent(50))
        {
            elements = Elements.No;
        }

        // select head covering 33% chance for each
        int headCoveringRoll = UnityEngine.Random.Range(0, 100);
        // HeadCoverings_Base_Hair
        if (headCoveringRoll <= 33)
        {
            headCovering = HeadCovering.HeadCoverings_Base_Hair;
        }
        // HeadCoverings_No_FacialHair
        if (headCoveringRoll > 33 && headCoveringRoll < 66)
        {
            headCovering = HeadCovering.HeadCoverings_No_FacialHair;
        }
        // HeadCoverings_No_Hair
        if (headCoveringRoll >= 66)
        {
            headCovering = HeadCovering.HeadCoverings_No_Hair;
        }

        CharacterObjectGroups         cog       = cRan.female;
        CharacterObjectListsAllGender allGender = cRan.allGender;
        //roll for gender
        switch (gender)
        {
        case Gender.Male:
            cog = cRan.male;
            // roll for facial hair if male
            if (!GetPercent(50))
            {
                facialHair = FacialHair.No;
            }
            break;

        case Gender.Female:
            cog = cRan.female;
            // no facial hair if female
            facialHair = FacialHair.No;

            break;
        }

        // if facial elements are enabled
        switch (elements)
        {
        case Elements.Yes:
            //select head with all elements
            if (cog.headAllElements.Count != 0)
            {
                ActivateItem(cog.headAllElements[UnityEngine.Random.Range(0, cog.headAllElements.Count)]);
            }

            //select eyebrows
            if (cog.eyebrow.Count != 0)
            {
                ActivateItem(cog.eyebrow[UnityEngine.Random.Range(0, cog.eyebrow.Count)]);
            }

            //select facial hair (conditional)
            if (cog.facialHair.Count != 0 && facialHair == FacialHair.Yes && gender == Gender.Male && headCovering != HeadCovering.HeadCoverings_No_FacialHair)
            {
                ActivateItem(cog.facialHair[UnityEngine.Random.Range(0, cog.facialHair.Count)]);
            }

            // select hair attachment
            switch (headCovering)
            {
            case HeadCovering.HeadCoverings_Base_Hair:
                // set hair attachment to index 1
                if (allGender.all_Hair.Count != 0)
                {
                    ActivateItem(allGender.all_Hair[1]);
                }
                if (allGender.headCoverings_Base_Hair.Count != 0)
                {
                    ActivateItem(allGender.headCoverings_Base_Hair[UnityEngine.Random.Range(0, allGender.headCoverings_Base_Hair.Count)]);
                }
                break;

            case HeadCovering.HeadCoverings_No_FacialHair:
                // no facial hair attachment
                if (allGender.all_Hair.Count != 0)
                {
                    ActivateItem(allGender.all_Hair[UnityEngine.Random.Range(0, allGender.all_Hair.Count)]);
                }
                if (allGender.headCoverings_No_FacialHair.Count != 0)
                {
                    ActivateItem(allGender.headCoverings_No_FacialHair[UnityEngine.Random.Range(0, allGender.headCoverings_No_FacialHair.Count)]);
                }
                break;

            case HeadCovering.HeadCoverings_No_Hair:
                // select hair attachment
                if (allGender.headCoverings_No_Hair.Count != 0)
                {
                    ActivateItem(allGender.all_Hair[UnityEngine.Random.Range(0, allGender.all_Hair.Count)]);
                }
                // if not human
                if (race != Race.Human)
                {
                    // select elf ear attachment
                    if (allGender.elf_Ear.Count != 0)
                    {
                        ActivateItem(allGender.elf_Ear[UnityEngine.Random.Range(0, allGender.elf_Ear.Count)]);
                    }
                }
                break;
            }
            break;

        case Elements.No:
            //select head with no elements
            if (cog.headNoElements.Count != 0)
            {
                ActivateItem(cog.headNoElements[UnityEngine.Random.Range(0, cog.headNoElements.Count)]);
            }
            break;
        }

        // select torso starting at index 1
        if (cog.torso.Count != 0)
        {
            ActivateItem(cog.torso[UnityEngine.Random.Range(1, cog.torso.Count)]);
        }

        // determine chance for upper arms to be different and activate
        if (cog.arm_Upper_Right.Count != 0)
        {
            RandomizeLeftRight(cog.arm_Upper_Right, cog.arm_Upper_Left, 15);
        }

        // determine chance for lower arms to be different and activate
        if (cog.arm_Lower_Right.Count != 0)
        {
            RandomizeLeftRight(cog.arm_Lower_Right, cog.arm_Lower_Left, 15);
        }

        // determine chance for hands to be different and activate
        if (cog.hand_Right.Count != 0)
        {
            RandomizeLeftRight(cog.hand_Right, cog.hand_Left, 15);
        }

        // select hips starting at index 1
        if (cog.hips.Count != 0)
        {
            ActivateItem(cog.hips[UnityEngine.Random.Range(1, cog.hips.Count)]);
        }

        // determine chance for legs to be different and activate
        if (cog.leg_Right.Count != 0)
        {
            RandomizeLeftRight(cog.leg_Right, cog.leg_Left, 15);
        }

        // select chest attachment
        if (allGender.chest_Attachment.Count != 0)
        {
            ActivateItem(allGender.chest_Attachment[UnityEngine.Random.Range(0, allGender.chest_Attachment.Count)]);
        }

        // select back attachment
        if (allGender.back_Attachment.Count != 0)
        {
            ActivateItem(allGender.back_Attachment[UnityEngine.Random.Range(0, allGender.back_Attachment.Count)]);
        }

        // determine chance for shoulder attachments to be different and activate
        if (allGender.shoulder_Attachment_Right.Count != 0)
        {
            RandomizeLeftRight(allGender.shoulder_Attachment_Right, allGender.shoulder_Attachment_Left, 10);
        }

        // determine chance for elbow attachments to be different and activate
        if (allGender.elbow_Attachment_Right.Count != 0)
        {
            RandomizeLeftRight(allGender.elbow_Attachment_Right, allGender.elbow_Attachment_Left, 10);
        }

        // select hip attachment
        if (allGender.hips_Attachment.Count != 0)
        {
            ActivateItem(allGender.hips_Attachment[UnityEngine.Random.Range(0, allGender.hips_Attachment.Count)]);
        }

        // determine chance for knee attachments to be different and activate
        if (allGender.knee_Attachement_Right.Count != 0)
        {
            RandomizeLeftRight(allGender.knee_Attachement_Right, allGender.knee_Attachement_Left, 10);
        }
    }
Exemplo n.º 15
0
 string GetFacialHair(FacialHair facialHair)
 {
     return((facialHair.Mustache + facialHair.Beard + facialHair.Sideburns > 0) ? "Yes" : "No");
 }
Exemplo n.º 16
0
 public static double Average(this FacialHair facialHair)
 {
     return(Math.Round((facialHair.Beard + facialHair.Moustache) / 2, 2));
 }