コード例 #1
0
    void HandleInventoryRequest(Action <string> callback = null, InventoryFilters filter = InventoryFilters.AllItems)
    {
        Action afterGetInventory = () =>
        {
            // ENABLE THIS AFTER WE HAVE A CONSISTENT WAY TO HIDE TINTS
            //ShowTint();
            floatingInvPrompt.Init(callback, filter);
        };

        PF_PlayerData.GetUserInventory(afterGetInventory);
    }
コード例 #2
0
 public void RefreshInventory()
 {
     if (this.activeMode == InventoryMode.Character)
     {
         PF_PlayerData.GetUserInventory();
         DialogCanvasController.RequestInventoryPrompt(null, this.activeFilter, this.showTransUi, FloatingInventoryController.InventoryMode.Character);
     }
     else
     {
         PF_PlayerData.GetCharacterInventory(PF_PlayerData.activeCharacter.characterDetails.CharacterId);
         DialogCanvasController.RequestInventoryPrompt(null, this.activeFilter, this.showTransUi, FloatingInventoryController.InventoryMode.Player);
     }
 }
コード例 #3
0
ファイル: PF_GamePlay.cs プロジェクト: youdk/UnicornBattle
    /// <summary>
    /// Raises the retrieve quest items success event.
    /// </summary>
    /// <param name="result">Result.</param>
    private static void OnRetrieveQuestItemsSuccess(ExecuteCloudScriptResult result)
    {
        if (!PF_Bridge.VerifyErrorFreeCloudScriptResult(result))
        {
            return;
        }

        QuestProgress.ItemsGranted    = JsonWrapper.DeserializeObject <List <ItemGrantResult> >(result.FunctionResult.ToString());
        QuestProgress.areItemsAwarded = true;
        PF_PlayerData.GetUserInventory();

        PF_Bridge.RaiseCallbackSuccess("Items granted", PlayFabAPIMethods.RetriveQuestItems, MessageDisplayStyle.none);
    }
コード例 #4
0
    void HandleInventoryRequest(Action <string> callback = null, InventoryFilters filter = InventoryFilters.AllItems, bool enableTransUi = true, FloatingInventoryController.InventoryMode displayMode = FloatingInventoryController.InventoryMode.Character)
    {
        Action afterGetInventory = () =>
        {
            // ENABLE THIS AFTER WE HAVE A CONSISTENT WAY TO HIDE TINTS
            //ShowTint();
            this.floatingInvPrompt.Init(callback, filter, enableTransUi, displayMode);
        };

        if (displayMode == FloatingInventoryController.InventoryMode.Character)
        {
            PF_PlayerData.GetCharacterInventory(PF_PlayerData.activeCharacter.characterDetails.CharacterId, afterGetInventory);
        }
        else
        {
            PF_PlayerData.GetUserInventory(afterGetInventory);
        }
    }
コード例 #5
0
    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.GetUserInventory();
            }
            break;

        case PlayFabAPIMethods.GetAccountInfo:
            DialogCanvasController.RequestStore(activeStoreId);
            break;
        }
    }
コード例 #6
0
 public void RefreshInventory()
 {
     PF_PlayerData.GetUserInventory();
     DialogCanvasController.RequestInventoryPrompt(null, this.activeFilter);
 }
コード例 #7
0
    public void CloseViewer()
    {
        PF_PlayerData.GetUserInventory();

        gameObject.SetActive(false);
    }