public void RotateCharacter() { if (PlayerPrefs.GetString("CharacterType") == "Male") { MaleCharacter.GetComponent <CharacterProperties> ().ChangeFacingFront(); } else if (PlayerPrefs.GetString("CharacterType") == "Female") { FemaleCharacter.GetComponent <CharacterProperties> ().ChangeFacingFront(); } }
// GameObject Child_Object; // public void ConfirmedCharacterSelectionButtonl () // { // var SecondryCam = GameObject.Find ("SecondCamera"); // secondaryCamera = SecondryCam; // if (PlayerPrefs.GetString ("CharacterType") == "Male") { // // // switch (PlayerPrefs.GetInt ("SkinToneColor")) { // case 0: // MaleCharacter.GetComponent<CharacterProperties> ().PlayerType = "White"; // break; // case 1: // MaleCharacter.GetComponent<CharacterProperties> ().PlayerType = "Brown"; // break; // case 2: // default: // MaleCharacter.GetComponent<CharacterProperties> ().PlayerType = "Black"; // break; // // } // } else { // // Child_Object = secondaryCamera.transform.GetChild (1).gameObject; // switch (PlayerPrefs.GetInt ("SkinToneColor")) { // case 0: // FemaleCharacter.GetComponent<CharacterProperties> ().PlayerType = "White"; // break; // case 1: // FemaleCharacter.GetComponent<CharacterProperties> ().PlayerType = "Brown"; // break; // case 2: // default: // FemaleCharacter.GetComponent<CharacterProperties> ().PlayerType = "Black"; // break; // } // } // } public IEnumerator DirectConfirm() { // var SecondryCam = GameObject.Find ("SecondCamera"); // secondaryCamera = SecondryCam; yield return(PlayerManager.Instance.StartCoroutine(PlayerManager.Instance.GetCharacterCustomisations())); // if (GameManager.GetGender () == GenderEnum.Male || PlayerPrefs.GetString ("CharacterType") == "Male") { // PlayerManager.Instance.MainCharacter = CharacterCustomizationAtStart.Instance.MaleCharacter; // } else { // PlayerManager.Instance.MainCharacter = CharacterCustomizationAtStart.Instance.FemaleCharacter; // } PlayerManager.Instance.MainCharacter.transform.position = new Vector3(0.5f, 3f, -1); PlayerManager.Instance.MainCharacter.transform.eulerAngles = new Vector3(0, 0, 0); PlayerManager.Instance.MainCharacter.transform.localScale = Vector3.one * 0.5f; if (PlayerPrefs.GetString("CharacterType") == "Male") { SelectedCharacter = MaleCharacter; switch (PlayerPrefs.GetInt("SkinToneColor")) { case 0: MaleCharacter.GetComponent <CharacterProperties> ().PlayerType = "White"; break; case 1: MaleCharacter.GetComponent <CharacterProperties> ().PlayerType = "Brown"; break; case 2: default: MaleCharacter.GetComponent <CharacterProperties> ().PlayerType = "Black"; break; } } else { SelectedCharacter = FemaleCharacter; switch (PlayerPrefs.GetInt("SkinToneColor")) { case 0: FemaleCharacter.GetComponent <CharacterProperties> ().PlayerType = "White"; break; case 1: FemaleCharacter.GetComponent <CharacterProperties> ().PlayerType = "Brown"; break; case 2: default: FemaleCharacter.GetComponent <CharacterProperties> ().PlayerType = "Black"; break; } } SelectedCharacter.transform.parent = null; DontDestroyOnLoad(SelectedCharacter); // DontDestroyOnLoad (SecondryCam); // SceneManager.LoadScene ("GamePlay"); StartCoroutine(LoadLevelAsynchronously()); }