コード例 #1
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();
    }