Beispiel #1
0
    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);
        }
    }
Beispiel #2
0
 void RecivedLoginCode(SPLogin_Responce loginResponse)
 {
     if (loginResponse.code == 7)
     {
         loginResponse.message = "Server Related Error";
     }
     if (loginResponse.code == 0)
     {
         if (recivedUserInfo != null)
         {
             UserInfo userInfo = loginResponse.userInfo;
             GameAuthentication.OnUserAuthorized(new WebserviceCalls.UserInfo(userInfo.ID.ToString(), userInfo.name, userInfo.email));
             recivedUserInfo(userInfo);
         }
     }
     else
     {
         if (loginMessageResponce != null)
         {
             loginMessageResponce(loginResponse);
         }
     }
 }
Beispiel #3
0
 void OnReceivedUserInfo(WebserviceCalls.UserInfo userInfo)
 {
     GameAuthentication.OnUserAuthorized(userInfo);
 }