void Awake() { instance = this; CharacerSelectionPanel.SetActive(false); MessagePopup.SetActive(false); MessageSubPopup.SetActive(false); CharCam.SetActive(false); Constants.CharSelected = "Female"; if (PlayerPrefs.HasKey("SelectedChar")) { Constants.CharSelected = PlayerPrefs.GetString("SelectedChar"); } if (PlayerPrefs.HasKey("Username")) { Constants.Username = PlayerPrefs.GetString("Username"); } }
public void OnSubmitButtonClick() { // CharCam.SetActive (false); // CharacerSelectionPanel.SetActive (false); // PlayingScript.instance.PlayingMenuPanel.SetActive (true); // PlayingScript.instance.PlayingMenuPanel.transform.SetAsLastSibling (); if (txtUserName.text.Trim(' ').Length > 0) { PreloaderScript.instance.OnEnabledLoderLogin(); Constants.Username = txtUserName.text; PlayerPrefs.SetString("Username", Constants.Username); if (index >= ObjCharacter.Length) { index = 0; } if (index == 0) { PlayerPrefs.SetString("SelectedChar", "Female"); Constants.CharSelected = "Female"; Constants.gender = "F"; } else { PlayerPrefs.SetString("SelectedChar", "Male"); Constants.CharSelected = "Male"; Constants.gender = "M"; } LoginScript.instance.OnAutoLogin(); } else { MessageSubPopup.SetActive(true); SoundManagerScript.instance.OnPlaySlideSound(); AnimationScript.Inst.OnMoveUpAnimation(null, MessagePopup, MessageSubPopup, true, 0.59f); } }
void HideSubPanel() { MessageSubPopup.SetActive(false); }