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
        //------------------
        //UNDERWEAR:
        //------------------

        public void UnderwearDropdownChange(int index)
        {
            SpriteAccessory newUnderwear = SpriteManager.UnderwearCollection.Find(item => item.name == underwearDropdown.options[index].text);

            if (newUnderwear.name != null)
            {
                currentCharacter.LoadUnderwearSetting(newUnderwear);
            }
            else
            {
                Logger.LogError($"Unable to find {underwearDropdown.options[index].text} in UnderwearCollection!", Category.UI);
            }
            RefreshUnderwear();
        }
        //------------------
        //UNDERWEAR:
        //------------------

        public void UnderwearDropdownChange(int index)
        {
            currentCharacter.LoadUnderwearSetting(underwearDropdown.options[index].text);
            RefreshUnderwear();
        }