public void SelectSex(bool man) { DummyFemale.SetActive(false); DummyMale.SetActive(false); isMale = man; if (man) { CharacterCustomization = MaleCustomizer; availableShirts = new List <int>() { 0, 1 }; } else { CharacterCustomization = FemaleCustomizer; availableShirts = new List <int>() { 1, 2 }; } SexSelectionPanel.SetActive(false); StartCustomization(); }
void Start() { skinColors = new List <Color>() { new Color(0.9058824f, 0.654902f, 0.5137255f, 1f), new Color(0.9528301954269409f, 0.7022832632064819f, 0.624733030796051f, 1f), new Color(0.9058824f, 0.5764706f, 0.4470588f, 1f), new Color(0.8901961f, 0.5372549f, 0.4117647f, 1f), new Color(0.8196079f, 0.4666667f, 0.3372549f, 1f), new Color(0.7764706f, 0.4078431f, 0.2745098f, 1f), new Color(0.7568628f, 0.3882353f, 0.254902f, 1f), new Color(0.6980392f, 0.3372549f, 0.2078431f, 1f), new Color(0.627451f, 0.2901961f, 0.1647059f, 1f), new Color(0.6235294f, 0.2862745f, 0.1607843f, 1f), new Color(0.5450981f, 0.2627451f, 0.1568628f, 1f), new Color(0.4470588f, 0.2196078f, 0.1333333f, 1f) }; eyeColors = new List <Color>() { new Color(0f, 0.003921569f, 0f, 1f), new Color(0f, 0.2705882f, 0f, 1f), new Color(0.3686275f, 0.3137255f, 0f, 1f), new Color(0.3058824f, 0.2705882f, 0f, 1f), new Color(0f, 0.5254902f, 0.5254902f, 1f), new Color(0.6313726f, 0.3686275f, 0f, 1f) }; hairColors = new List <Color>() { new Color(0.9960784f, 0.9764706f, 0.6156863f, 1f), new Color(0.1137255f, 0.07450981f, 0f, 1f), new Color(0f, 0.05882353f, 0f, 1f), new Color(1f, 0.9529412f, 0.5607843f, 1f), new Color(0.1647059f, 0.09803922f, 0f, 1f), new Color(0.7764706f, 0.3058824f, 0f, 1f), new Color(0.945098f, 0.3803922f, 0f, 1f), new Color(1f, 1f, 1f, 1f), new Color(0.8980392f, 0f, 0f, 1f), new Color(1f, 0.9529412f, 0.2705882f, 1f), new Color(0.9686275f, 0.7215686f, 0f, 1f), new Color(0.1411765f, 0f, 0f, 1f) }; availableShirts = new List <int>() { 0, 1 }; availablePants = new List <int>() { 0, 1 }; if (inGame) { InGameStart(); return; } string menjson = "{\"Hair\":7,\"Hat\":-1,\"TShirt\":9,\"Pants\":7,\"Shoes\":4,\"Beard\":-1,\"Accessory\":9,\"Fat\":0.0,\"Muscles\":1.9389452934265137,\"Slimness\":0.0,\"Thin\":72.66344451904297,\"BreastSize\":0.0,\"Neck_Width\":0.0,\"Ear_Size\":0.0,\"Ear_Angle\":0.0,\"Jaw_Width\":0.0,\"Jaw_Shift\":0.0,\"Jaw_Offset\":0.0,\"Cheek_Size\":0.0,\"Chin_Offset\":0.0,\"Eye_Width\":0.0,\"Eye_Form\":100.0,\"Eye_InnerCorner\":0.0,\"Eye_Corner\":0.0,\"Eye_Rotation\":0.0,\"Eye_Offset\":0.0,\"Eye_ScaleX\":0.0,\"Eye_ScaleY\":0.0,\"Eye_Size\":0.0,\"Eye_Close\":0.0,\"Eye_Height\":0.0,\"Brow_Height\":0.0,\"Brow_Shape\":0.0,\"Brow_Thickness\":0.0,\"Brow_Length\":0.0,\"Nose_Length\":0.0,\"Nose_Size\":0.0,\"Nose_Angle\":0.0,\"Nose_Offset\":0.0,\"Nose_Bridge\":0.0,\"Nose_Hump\":0.0,\"Mouth_Offset\":0.0,\"Mouth_Width\":0.0,\"Mouth_Size\":0.0,\"Mouth_Open\":0.0,\"Mouth_Bulging\":0.0,\"LipsCorners_Offset\":0.0,\"Face_Form\":0.0,\"Chin_Width\":0.0,\"Chin_Form\":0.0,\"Head_Offset\":0.0,\"Height\":0.0,\"Smile\":0.0,\"Sadness\":0.0,\"Surprise\":0.0,\"Thoughtful\":0.0,\"Angry\":0.0,\"HeadSize\":0.0,\"SkinColor\":{\"r\":0.9528301954269409,\"g\":0.7022832632064819,\"b\":0.624733030796051,\"a\":1.0},\"EyeColor\":{\"r\":0.23529411852359773,\"g\":0.0,\"b\":0.0,\"a\":1.0},\"HairColor\":{\"r\":0.0,\"g\":0.0,\"b\":0.0,\"a\":1.0},\"UnderpantsColor\":{\"r\":0.5660377740859985,\"g\":0.5660377740859985,\"b\":0.5660377740859985,\"a\":1.0}}"; string femalejson = "{\"Hair\":0,\"Hat\":-1,\"TShirt\":6,\"Pants\":4,\"Shoes\":0,\"Beard\":-1,\"Accessory\":-1,\"Fat\":0.0,\"Muscles\":0.0,\"Slimness\":110.0,\"Thin\":0.0,\"BreastSize\":1.8776158094406129,\"Neck_Width\":0.0,\"Ear_Size\":0.0,\"Ear_Angle\":0.0,\"Jaw_Width\":0.0,\"Jaw_Shift\":0.0,\"Jaw_Offset\":0.0,\"Cheek_Size\":0.0,\"Chin_Offset\":0.0,\"Eye_Width\":0.0,\"Eye_Form\":0.0,\"Eye_InnerCorner\":0.0,\"Eye_Corner\":0.0,\"Eye_Rotation\":0.0,\"Eye_Offset\":0.0,\"Eye_ScaleX\":0.0,\"Eye_ScaleY\":0.0,\"Eye_Size\":0.0,\"Eye_Close\":0.0,\"Eye_Height\":0.0,\"Brow_Height\":0.0,\"Brow_Shape\":0.0,\"Brow_Thickness\":0.0,\"Brow_Length\":0.0,\"Nose_Length\":0.0,\"Nose_Size\":0.0,\"Nose_Angle\":0.0,\"Nose_Offset\":0.0,\"Nose_Bridge\":0.0,\"Nose_Hump\":0.0,\"Mouth_Offset\":0.0,\"Mouth_Width\":0.0,\"Mouth_Size\":0.0,\"Mouth_Open\":0.0,\"Mouth_Bulging\":0.0,\"LipsCorners_Offset\":0.0,\"Face_Form\":0.0,\"Chin_Width\":0.0,\"Chin_Form\":0.0,\"Head_Offset\":0.0,\"Height\":-0.008261614479124546,\"Smile\":0.0,\"Sadness\":0.0,\"Surprise\":0.0,\"Thoughtful\":0.0,\"Angry\":0.0,\"HeadSize\":0.0,\"SkinColor\":{\"r\":0.9528301954269409,\"g\":0.7022832632064819,\"b\":0.624733030796051,\"a\":1.0},\"EyeColor\":{\"r\":0.7568627595901489,\"g\":0.35686275362968447,\"b\":0.0,\"a\":1.0},\"HairColor\":{\"r\":1.0,\"g\":0.886274516582489,\"b\":0.615686297416687,\"a\":1.0},\"UnderpantsColor\":{\"r\":0.27358490228652956,\"g\":0.27358490228652956,\"b\":0.27358490228652956,\"a\":1.0}}"; CharacterCustomizationSetup maleCust = CharacterCustomizationSetup.DeserializeFromJson(menjson); DummyMale.GetComponent <CharacterCustomization>().SetCharacterSetup(maleCust); CharacterCustomizationSetup femaleCust = CharacterCustomizationSetup.DeserializeFromJson(femalejson); DummyFemale.GetComponent <CharacterCustomization>().SetCharacterSetup(femaleCust); DummyFemale.GetComponent <CharacterCustomization>().SetFaceShape(FaceShapeType.Eye_Form, 100); }