Example #1
0
        public void RollRandomCharacter()
        {
            if (currentCharacter.Gender == Gender.Male)
            {
                currentCharacter.Name = StringManager.GetRandomMaleName();
            }
            else
            {
                currentCharacter.Name = StringManager.GetRandomFemaleName();
            }
            currentCharacter.LoadHairSetting(SpriteManager.HairCollection[
                                                 UnityEngine.Random.Range(0, SpriteManager.HairCollection.Count - 1)]);

            currentCharacter.hairColor = availableHairColors[UnityEngine.Random.Range(0, availableHairColors.Count - 1)];

            currentCharacter.LoadFacialHairSetting(SpriteManager.FacialHairCollection[
                                                       SpriteManager.FacialHairCollection.Count - 1]);

            currentCharacter.facialHairColor = availableHairColors[UnityEngine.Random.Range(0, availableHairColors.Count - 1)];

            currentCharacter.LoadUnderwearSetting(SpriteManager.UnderwearCollection[
                                                      UnityEngine.Random.Range(0, SpriteManager.UnderwearCollection.Count - 1)]);
            currentCharacter.LoadSocksSetting(SpriteManager.SocksCollection[
                                                  UnityEngine.Random.Range(0, SpriteManager.SocksCollection.Count - 1)]);
            currentCharacter.skinTone = availableSkinColors[UnityEngine.Random.Range(0, availableSkinColors.Count - 1)];

            currentCharacter.Age = UnityEngine.Random.Range(19, 78);

            RefreshAll();
        }
Example #2
0
        //------------------
        //FACIAL HAIR:
        //------------------

        public void FacialHairDropdownChange(int index)
        {
            SpriteAccessory newFacialHair = SpriteManager.FacialHairCollection.Find(item => item.name == facialHairDropdown.options[index].text);

            if (newFacialHair.name != null)
            {
                currentCharacter.LoadFacialHairSetting(newFacialHair);
            }
            else
            {
                Logger.LogError($"Unable to find {facialHairDropdown.options[index].text} in UnderwearCollection!", Category.UI);
            }
            RefreshFacialHair();
        }
        //------------------
        //FACIAL HAIR:
        //------------------

        public void FacialHairDropdownChange(int index)
        {
            currentCharacter.LoadFacialHairSetting(facialHairDropdown.options[index].text);
            RefreshFacialHair();
        }