public void Enter() { PlayerPrefs.SetString("Name", charName); PlayerPrefs.SetString("Gender", gender); if (gender == "Female") { PlayerPrefs.SetString("GenderSvHCapital", "She"); PlayerPrefs.SetString("GenderSvH", "she"); PlayerPrefs.SetString("GenderHvHCapital", "Her"); PlayerPrefs.SetString("GenderHvH", "her"); } else { PlayerPrefs.SetString("GenderSvHCapital", "He"); PlayerPrefs.SetString("GenderSvH", "he"); PlayerPrefs.SetString("GenderHvhCapital", "Him"); PlayerPrefs.SetString("GenderHvh", "him"); } PlayerPrefs.SetString("Crime", ItemInformation.GetCrimesMap(crime)); PlayerPrefs.SetString("Station", ItemInformation.GetStationsMap(station)); PlayerPrefsAddOns.SetColor("SkinTone", skinTone); PlayerPrefs.SetString("Hair", hair.ToString()); PlayerPrefsAddOns.SetColor("HairColor", hairColor); PlayerPrefsAddOns.SetColor("EyeColor", eyeColor); PlayerPrefs.SetString("Top", top.ToString()); PlayerPrefsAddOns.SetColor("TopColor", topColor); PlayerPrefs.SetString("Bottoms", bottoms.ToString()); PlayerPrefsAddOns.SetColor("BottomsColor", bottomsColor); PlayerPrefs.SetString("Shoes", shoes.ToString()); PlayerPrefsAddOns.SetColor("ShoesColor", shoesColor); }
public void LoadScene(string sceneName) { List <string> friendships = new List <string>(); Character[] characters = characterParent.GetComponentsInChildren <Character>(); for (int i = 0; i < characters.Length; i++) { for (int j = 0; j < characters[i].friendships.Count(); j++) { Friendship friendship = characters[i].friendships.Get(j); friendships.Add(friendship.character1.name + ":" + friendship.character2.name + ":" + friendship.amount); } } PlayerPrefsAddOns.SetStringArray("Friendships", friendships.ToArray()); PlayerPrefs.SetString("Arguments", ""); Application.LoadLevel(sceneName); }