void Start() { ContainerKeybinding.DisableKeybinding("Login"); loginTab.SetActive(true); registerErrorLabel.text = ""; registerTab.SetActive(false); confirmationTab.SetActive(false); loginUserEmailValidator = loginUserEmail.GetComponent <UIInputVisualValidation>(); loginUserPasswordValidator = loginUserPassword.GetComponent <UIInputVisualValidation>(); registerUserNameValidator = registerUserName.GetComponent <UIInputLengthValidation>(); registerUserEmailValidator = registerUserEmail.GetComponent <UIInputVisualValidation>(); registerUserPasswordValidator = registerUserPassword.GetComponent <UIInputVisualValidation>();; registerUserPasswordConfirmValidator = registerUserPasswordConfirm.GetComponent <UIInputVisualValidation>(); resendVerificationTextObject.SetActive(false); if (!string.IsNullOrEmpty(PlayerPrefs.GetString("SocialPlay_Login_UserEmail"))) { loginUserEmail.value = PlayerPrefs.GetString("SocialPlay_Login_UserEmail"); } if (!string.IsNullOrEmpty(PlayerPrefs.GetString("SocialPlay_UserGuid"))) { SPLogin.UserInfo userInfo = new SPLogin.UserInfo(new Guid(PlayerPrefs.GetString("SocialPlay_UserGuid")), PlayerPrefs.GetString("SocialPlay_UserName"), PlayerPrefs.GetString("SocialPlay_UserEmail")); GameAuthentication.OnUserAuthorized(new WebserviceCalls.UserInfo(userInfo.ID.ToString(), userInfo.name, userInfo.email)); RecivedUserGuid(userInfo); } }
public static void DeactivateStore() { if (!store.isStoreCurrentActive) { return; } store.isStoreCurrentActive = false; store.StoreRootObject.SetActive(false); ContainerKeybinding.EnableKeybinding("Store"); }
void RecivedUserGuid(SPLogin.UserInfo obj) { if (autoLoginToggle != null && autoLoginToggle.value == true) { PlayerPrefs.SetString("SocialPlay_UserGuid", obj.ID.ToString()); PlayerPrefs.SetString("SocialPlay_UserName", obj.name); PlayerPrefs.SetString("SocialPlay_UserEmail", obj.email); } resendVerificationTextObject.SetActive(false); loginErrorLabel.text = "User logged in"; this.gameObject.SetActive(false); ContainerKeybinding.EnableKeybinding("Login"); }
public static void ActivateStore(bool loadItems) { if (store.isStoreCurrentActive) { return; } store.isStoreCurrentActive = true; store.StoreRootObject.SetActive(true); ContainerKeybinding.DisableKeybinding("Store"); if (loadItems) { store.userCurrencyBalance.GetCurrencyBalance(null); store.storeDisplay.GetItems(); } }