void HandleOnLoginSuccess(string message, MessageDisplayStyle style)
 {
     if (message.Contains("SUCCESS"))
     {
         SceneController.Instance.RequestSceneChange(SceneController.GameScenes.CharacterSelect);
     }
 }
Exemple #2
0
 private void HandleCallbackSuccess(string details, PlayFabAPIMethods method, MessageDisplayStyle style)
 {
     switch (method)
     {
     case PlayFabAPIMethods.GetTitleData_General: CheckPushStatus(); break;
     }
 }
Exemple #3
0
    void HandleCallbackSuccess(string message, MessageDisplayStyle mg = MessageDisplayStyle.none)
    {
        if (message.Contains("New Account Registered"))
        {
            Debug.Log("Account Created, logging in with new account.");

            //System.Collections.Generic.Dictionary<string, string> updates = new System.Collections.Generic.Dictionary<string, string>();
            //updates.Add("FireComponent", "1000");
            //updates.Add("WaterComponent", "1000");
            //updates.Add("GrassComponent", "1000");
            //updates.Add("DarkComponent", "1000");
            //updates.Add("LightComponent", "1000");
            FG_ResourceData updates = new FG_ResourceData()
            {
                FireComponent = 1000, WaterComponent = 1000, DarkComponent = 1000, GrassComponent = 1000, LightComponent = 1000
            };
            System.Collections.Generic.Dictionary <string, string> update2 = new System.Collections.Generic.Dictionary <string, string>();
            update2.Add("Component", PlayFab.Json.PlayFabSimpleJson.SerializeObject(updates));

            UnityEngine.Events.UnityAction <PlayFab.ClientModels.UpdateUserDataResult> action = (PlayFab.ClientModels.UpdateUserDataResult s) => {
                PF_Authentication.LoginWithUsername(user.text, pass1.text);
            };

            PF_PlayerData.UpdateUserData(update2, "Public", action);
        }
    }
    public void HandleCallbackSuccess(string details, PlayFabAPIMethods method, MessageDisplayStyle style)
    {
        switch (method)
        {
        case PlayFabAPIMethods.MakePurchase:
            // refresh after purchase.
            if (PF_PlayerData.activeCharacter == null)
            {
                PF_PlayerData.GetUserAccountInfo();
            }
            else
            {
                PF_PlayerData.GetCharacterInventory(PF_PlayerData.activeCharacter.characterDetails.CharacterId);
            }
            break;

        case PlayFabAPIMethods.GetCharacterInventory:
            DialogCanvasController.RequestStore(this.StoreName.text);
            break;

        case PlayFabAPIMethods.GetAccountInfo:
            DialogCanvasController.RequestStore(this.StoreName.text);
            break;
        }
    }
 /// <summary>
 /// Informs lisenters when a successful login occurs
 /// </summary>
 /// <param name="details">Details - general string for additional details </param>
 /// <param name="style">Style - controls how the message should be handled </param>
 public static void RaiseLoginSuccessEvent(string details, MessageDisplayStyle style)
 {
     if (OnLoginSuccess != null)
     {
         OnLoginSuccess(details, style);
     }
 }
Exemple #6
0
 /// <summary>
 /// The standard way to notify listeners that a PF call has failed
 /// </summary>
 /// <param name="details"> a string that can be used so send any additional custom information </param>
 /// <param name="method"> enum that maps to the call that just completed successfully </param>
 /// <param name="style"> error will throw the standard error box, none will eat the message and output to console </param>
 public static void RaiseCallbackError(string details, PlayFabAPIMethods method, MessageDisplayStyle style)
 {
     if (OnPlayFabCallbackError != null)
     {
         OnPlayFabCallbackError(details, method, style);
     }
 }
 /// <summary>
 /// Informs lisenters when a successful login occurs
 /// </summary>
 /// <param name="details">Details - general string for additional details </param>
 /// <param name="style">Style - controls how the message should be handled </param>
 public static void RaiseLoginFailedEvent(string details, MessageDisplayStyle style)
 {
     if (OnLoginFail != null)
     {
         OnLoginFail(details, style);
     }
 }
Exemple #8
0
    void HandleOnLoginFail(string message, MessageDisplayStyle style)
    {
        Debug.Log(message);
//#if UNITY_ANDRIOD || UNITY_IPHONE
        //EnableUserSelectMode();
//#else
        EnableDeveloperMode();
//#endif
    }
Exemple #9
0
 void HandleOnLoginSuccess(string message, MessageDisplayStyle style)
 {
     debugs.text = message;
     if (message.Contains("SUCCESS"))
     {
         Debug.Log("login success ! ready  to load scene");
         SceneController.Instance.RequestSceneChange(SceneController.GameScenes.Profile);
     }
 }
Exemple #10
0
    public void HandleCallbackSuccess(string details, PlayFabAPIMethods method, MessageDisplayStyle style)
    {
        if (details.Contains("Encounters Loaded!") && method == PlayFabAPIMethods.GetTitleData)
        {
            this.isEncounterListAvailable = true;
        }

        CheckToContinue();
    }
 public void HandleCallbackSuccess(string details, PlayFabAPIMethods method, MessageDisplayStyle style)
 {
     switch (method)
     {
     case PlayFabAPIMethods.GetCharacterReadOnlyData:
         _isCharacterDataLoaded = true;
         break;
     }
     CheckToContinue();
 }
 public void HandleCallbackSuccess(string details, PlayFabAPIMethods method, MessageDisplayStyle style)
 {
     switch (method)
     {
     case PlayFabAPIMethods.GetCharacterInventory:
         //var items = PF_GamePlay.QuestProgress.ItemsGranted;
         //PF_GamePlay.ActiveQuest.levelData.
         Debug.Log("Enable ViewItems Button.");
         break;
     }
 }
Exemple #13
0
    private void OnPlayfabCallbackSuccess(string details, PlayFabAPIMethods method, MessageDisplayStyle displayStyle)
    {
        if (method == PlayFabAPIMethods.SavePlayerInfo)
        {
            //PF_PlayerData.GetCharacterDataById(selectedSlot.saved.characterDetails.CharacterId);
            PF_PlayerData.GetCharacterData();
        }
        else if (method == PlayFabAPIMethods.GetCharacterReadOnlyData)
        {
            RefreshData();

            equipController.Refresh();
        }
    }
Exemple #14
0
    public void HandleCallbackSuccess(string details, PlayFabAPIMethods method, MessageDisplayStyle style)
    {
        switch (method)
        {
        case PlayFabAPIMethods.GetTitleData_General:
            maxUniSlots = PF_GameData.Classes.Count;
            if (maxUniSlots > 3)
            {
                Debug.LogWarning("Currently configured to only allow 3 playable unicorn classes.");
            }

            Init();
            break;
        }
    }
    private void HandleCallbackSuccess(string details, PlayFabAPIMethods method, MessageDisplayStyle displayStyle)
    {
        if (details != missionName)
        {
            return;
        }

        if (method == PlayFabAPIMethods.GetPlayerLeaderboard)
        {
            SetPlayerScore();
        }
        else if (method == PlayFabAPIMethods.GetFriendsLeaderboard)
        {
            SetHighestRankScore();
        }
    }
    public void HandleCallbackError(string details, PlayFabAPIMethods method, MessageDisplayStyle style)
    {
        switch (style)
        {
        case MessageDisplayStyle.error:
            string errorMessage = string.Format("CALLBACK ERROR: {0}: {1}", method, details);
            //ShowTint();
            this.errorPrompt.RaiseErrorDialog(errorMessage);
            CloseLoadingPromptAfterError();
            break;

        default:
            CloseLoadingPrompt(method);
            Debug.Log(string.Format("CALLBACK ERROR: {0}: {1}", method, details));
            break;
        }
    }
Exemple #17
0
    public void HandleCallbackSuccess(string details, PlayFabAPIMethods method, MessageDisplayStyle style)
    {
        switch (method)
        {
        case PlayFabAPIMethods.GetTitleData_General:
        case PlayFabAPIMethods.GetAccountInfo:
            isTitleDataLoaded       |= method == PlayFabAPIMethods.GetTitleData_General;
            isPlayerInventoryLoaded |= method == PlayFabAPIMethods.GetAccountInfo;

            int extraCount = 0;
            InventoryCategory temp;
            if (PF_PlayerData.inventoryByCategory != null && PF_PlayerData.inventoryByCategory.TryGetValue("ExtraCharacterSlot", out temp))
            {
                extraCount = temp.count;
            }
            maxCharacterSlots = PF_GameData.StartingCharacterSlots + extraCount;
            break;

        case PlayFabAPIMethods.GetAllUsersCharacters:
            isPlayerCharatersLoaded = true;
            PF_PlayerData.GetCharacterData();
            PF_PlayerData.GetCharacterStatistics();
            break;

        case PlayFabAPIMethods.DeleteCharacter:
            ResetDataChecks();
            GameController.CharacterSelectDataRefresh();
            break;

        case PlayFabAPIMethods.GrantCharacterToUser:
            ResetDataChecks();
            GameController.CharacterSelectDataRefresh();
            break;

        case PlayFabAPIMethods.GetCharacterReadOnlyData:
            isCharacterDataLoaded = true;
            break;

        case PlayFabAPIMethods.GetUserStatistics:
            isUserStatsLoaded = true;
            break;
        }
        CheckToInit();
    }
Exemple #18
0
    private void HandleCallbackSuccess(string details, PlayFabAPIMethods method, MessageDisplayStyle displayStyle)
    {
        switch (method)
        {
        case PlayFabAPIMethods.GetTitleData:
            break;

        case PlayFabAPIMethods.GetAccountInfo:
            isAccountInfoLoaded = true;
            break;

        case PlayFabAPIMethods.GetCharacterReadOnlyData:
            isCharacterDataLoaded = true;
            SetSavedTeamData();

            break;

        case PlayFabAPIMethods.UpdateUserData:
            isUserDataUpdated = true;
            SetSavedTeamData();
            teamUiController.Init();

            break;

        case PlayFabAPIMethods.GrantCharacterToUser:

            PF_PlayerData.GetPlayerCharacters(() =>
            {
                PF_PlayerData.GetCharacterData(() =>
                {
                    CheckIsNewPlayer();
                });
            });
            break;
        }

        CheckToContinue();
    }
Exemple #19
0
 void HandleOnLoginSuccess(string message, MessageDisplayStyle style)
 {
     HandleCallbackSuccess(message, PlayFabAPIMethods.GenericLogin, style);
 }
 public void HandleCallbackSuccess(string details, PlayFabAPIMethods method, MessageDisplayStyle style)
 {
     CloseLoadingPrompt(method);
 }
Exemple #21
0
 public void HandleCallbackSuccess(string details, PlayFabAPIMethods method, MessageDisplayStyle style)
 {
 }
 void HandleOnLoginFail(string message, MessageDisplayStyle style)
 {
     Debug.Log(message);
     EnableUserSelectMode();
 }
Exemple #23
0
 void HandleOnLoginFail(string message, MessageDisplayStyle style)
 {
     HandleCallbackError(message, PlayFabAPIMethods.GenericLogin, style);
 }
Exemple #24
0
 public void HandleCallbackSuccess(string details, PlayFabAPIMethods method, MessageDisplayStyle style)
 {
     CloseLoadingPrompt(method);
     //Debug.Log(string.Format("{0} completed successfully.", method.ToString()));
 }
 private void HandlePlayfabCallbackSuccess(string details, PlayFabAPIMethods method, MessageDisplayStyle displayStyle)
 {
     if (method == PlayFabAPIMethods.DrawCharacterToUser)
     {
         ShowGrantedCharacterImage(details);
         debugText.text = details;
         PF_PlayerData.GetUserAccountInfo();
     }
     if (method == PlayFabAPIMethods.GetAccountInfo)
     {
         vcText.text = PF_PlayerData.virtualCurrency["NT"].ToString();
         CanPlayerDraw();
     }
 }