예제 #1
0
 void HandleCallbackSuccess(string message, PlayFabAPIMethods method)
 {
     if (method == PlayFabAPIMethods.RegisterPlayFabUser)
     {
         Debug.Log("Account Created, logging in with new account.");
         PlayFabLoginCalls.RequestSpinner();
         PlayFabLoginCalls.LoginWithUsername(user.text, pass1.text);
     }
 }
예제 #2
0
 public void LogIn()
 {
     PlayFabLoginCalls.RequestSpinner();
     if (User.text.Contains("@"))
     {
         PlayFabLoginCalls.LoginWithEmail(User.text, Password.text);
     }
     else
     {
         PlayFabLoginCalls.LoginWithUsername(User.text, Password.text);
     }
 }
    void Login()
    {
        Debug.Log("Login Path: " + this.loginPathToUse);
        switch (this.loginPathToUse)
        {
        case PlayFabLoginCalls.LoginPathways.pf_username:
            PlayFabLoginCalls.RequestSpinner();
            PlayFabLoginCalls.LoginWithUsername(this.accountInfo.Username, this.password.text);
            break;

        case PlayFabLoginCalls.LoginPathways.pf_email:
            PlayFabLoginCalls.RequestSpinner();
            PlayFabLoginCalls.LoginWithEmail(this.accountInfo.PrivateInfo.Email, this.password.text);
            break;

        case PlayFabLoginCalls.LoginPathways.deviceId:
            PlayFabLoginCalls.RequestSpinner();
            PlayFabLoginCalls.TestDeviceIdHasAccount();
            break;

        case PlayFabLoginCalls.LoginPathways.facebook:
            this.isCounting = false;
            PlayFabLoginCalls.RequestSpinner();
            PlayFabLoginCalls.StartFacebookLogin();
            break;

        case PlayFabLoginCalls.LoginPathways.gameCenter:
            this.isCounting = false;
            PlayFabLoginCalls.RequestSpinner();
            PlayFabLoginCalls.StartGameCenterLogin();
            break;

        case PlayFabLoginCalls.LoginPathways.googlePlus:
            this.isCounting = false;
            PlayFabLoginCalls.RequestSpinner();
            PlayFabLoginCalls.StartGooglePlusLogin();
            break;

        case PlayFabLoginCalls.LoginPathways.steam:
            Debug.LogWarning("Steam Token Authentication not yet implemented.");
            break;
        }
    }