Ejemplo n.º 1
0
    void OnRegisteredtoSession(CloudGoodsUser user)
    {
        storeLoader.SetActive(true);
        StoreInitializer initializer = storeLoader.GetComponent <StoreInitializer>();

        initializer.InitializeStore();
    }
 void OnReceivedSocialPlayUser(CloudGoodsUser socialplayMsg)
 {
     if (CloudGoodsInitialized != null)
     {
         CloudGoodsInitialized(true);
     }
 }
Ejemplo n.º 3
0
 void OnReceivedCloudGoodsUser(CloudGoodsUser userLoginResponse)
 {
     if (UserLoggedIn != null)
     {
         UserLoggedIn(userLoginResponse);
     }
 }
Ejemplo n.º 4
0
    void OnUserLoggedIn(CloudGoodsUser user)
    {
        UserName.text    = user.UserName;
        UserEmail.text   = "N/A";
        UserId.text      = user.UserID;
        SessionId.text   = user.SessionId.ToString();
        isNewPlayer.text = user.IsNewUserToWorld.ToString();

        UserInfoDisplayWindow.SetActive(true);
    }
Ejemplo n.º 5
0
        public static void LoginByPlatform(LoginByPlatformRequest request, Action <CloudGoodsUser> callback)
        {
            request.DeviceType = GetDeviceType();

            CallHandler.Instance.LoginByPlatform(request, user =>
            {
                _ActiveUser = user;
                callback(user);
            });
        }
    void RecivedUserGuid(CloudGoodsUser obj)
    {
        if (autoLoginToggle != null && autoLoginToggle.isOn == true)
        {
            PlayerPrefs.SetString("SocialPlay_UserGuid", obj.userGuid.ToString());
            PlayerPrefs.SetString("SocialPlay_UserName", obj.userName);
            PlayerPrefs.SetString("SocialPlay_UserEmail", obj.userEmail);
        }

        resendVerificationTextObject.SetActive(false);
        loginErrorLabel.text = "User logged in";

        CloseAllTabsOnLogin();
    }
Ejemplo n.º 7
0
    public CloudGoodsUser ConvertToUserInfo(string dataString)
    {
        string   userInfoString = ParseString(dataString);
        JsonData data           = LitJson.JsonMapper.ToObject(userInfoString);

        CloudGoodsUser userinfo = new CloudGoodsUser(data["userGuid"].ToString().Trim(), data["userName"].ToString(), "");

        if (data["userEmail"] != null)
        {
            userinfo.userEmail = data["userEmail"].ToString();
        }

        return(userinfo);
    }
Ejemplo n.º 8
0
    public UserResponse ConvertToSPLoginResponse(string dataString)
    {
        string parsedString = ParseString(dataString);

        JsonData data = LitJson.JsonMapper.ToObject(parsedString);

        CloudGoodsUser userInfo = null;

        if (data["code"].ToString() == "0")
        {
            JsonData userData = LitJson.JsonMapper.ToObject(data["message"].ToString());
            userInfo = new CloudGoodsUser(userData["ID"].ToString(), userData["name"].ToString(), userData["email"].ToString());
        }

        UserResponse responce = new UserResponse(int.Parse(data["code"].ToString()), data["message"].ToString(), userInfo);

        return(responce);
    }
    void Start()
    {
        if (!RemoveIfNeeded())
        {
            return;
        }

        registerErrorLabel.text = "";
        registerTab.SetActive(false);
        confirmationTab.SetActive(false);

        loginUserEmailValidator    = loginUserEmail.GetComponent <InputFieldValidation>();
        loginUserPasswordValidator = loginUserPassword.GetComponent <InputFieldValidation>();

        registerUserEmailValidator           = registerUserEmail.GetComponent <InputFieldValidation>();
        registerUserPasswordValidator        = registerUserPassword.GetComponent <InputFieldValidation>();;
        registerUserPasswordConfirmValidator = registerUserPasswordConfirm.GetComponent <InputFieldValidation>();
        resendVerificationTextObject.SetActive(false);
        if (!string.IsNullOrEmpty(PlayerPrefs.GetString("SocialPlay_Login_UserEmail")))
        {
            loginUserEmail.text = PlayerPrefs.GetString("SocialPlay_Login_UserEmail");
        }
        else
        {
            loginUserEmail.text = "";
        }

        if (!string.IsNullOrEmpty(PlayerPrefs.GetString("SocialPlay_UserGuid")))
        {
            CloudGoodsUser userInfo = new CloudGoodsUser(PlayerPrefs.GetString("SocialPlay_UserGuid"), PlayerPrefs.GetString("SocialPlay_UserName"), PlayerPrefs.GetString("SocialPlay_UserEmail"));

            CloudGoods.AuthorizeUser(userInfo);

            RecivedUserGuid(userInfo);
        }
    }
Ejemplo n.º 10
0
 void OnRegisteredtoSession(CloudGoodsUser user)
 {
     PremiumCurrencyStore.SetActive(true);
 }
 public UserResponse(int caseCode, string msg, CloudGoodsUser newUserInfo)
 {
     code     = caseCode;
     message  = msg;
     userInfo = newUserInfo;
 }
Ejemplo n.º 12
0
 void CloudGoods_OnUserAuthorized(CloudGoodsUser userResponse)
 {
     loader.LoadItemRecipes();
 }
 void OnRegisteredtoSession(CloudGoodsUser user)
 {
     StoreDisplay.SetActive(true);
     itemBundlesLoader.GetItemBundles();
 }
Ejemplo n.º 14
0
 void OnUserLogin(CloudGoodsUser userResponse)
 {
     Debug.Log("User logged in: " + userResponse.UserName + " with Session ID: " + userResponse.SessionId + "   with UserID: " + userResponse.UserID + " first login: " + userResponse.IsNewUserToWorld);
     OnUserLoggedIn(userResponse);
 }
Ejemplo n.º 15
0
 public static void Logout()
 {
     _ActiveUser = null;
 }
Ejemplo n.º 16
0
 void OnRegisteredtoSession(CloudGoodsUser user)
 {
     ItemContainerManager.RefreshAllPersistentItemContainers();
 }
 void OnUserLoggedIn(CloudGoodsUser user)
 {
     premiumCurrencyWindow.SetActive(true);
 }