コード例 #1
0
 public static void RequestInventoryPrompt(Action <string> callback = null, InventoryFilters filter = InventoryFilters.AllItems)
 {
     if (RaiseInventoryPromptRequest != null)
     {
         RaiseInventoryPromptRequest(callback, filter);
     }
 }
コード例 #2
0
 public static void RequestInventoryPrompt(Action <string> callback = null, InventoryFilters filter = InventoryFilters.AllItems, bool enableTransUi = true, FloatingInventoryController.InventoryMode displayMode = FloatingInventoryController.InventoryMode.Character)
 {
     if (RaiseInventoryPromptRequest != null)
     {
         RaiseInventoryPromptRequest(callback, filter, enableTransUi, displayMode);
     }
 }
コード例 #3
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);
    }
コード例 #4
0
    void OnClickTabButton(GameObject button)
    {
        InventoryFilters filter = _tabMapping[button];

        if (_selectedTab != filter)
        {
            StopCoroutine("StepToUnderSelection");
            StartCoroutine("StepToUnderSelection", button.transform.parent.transform.localPosition);
            List <ItemType> list = new List <ItemType>();
            switch (filter)
            {
            case InventoryFilters.weapon:
                list.Add(ItemType.weapon);
                break;

            case InventoryFilters.armor:
                list.Add(ItemType.armor);
                break;

            case InventoryFilters.ornament:
                list.Add(ItemType.ornament);
                break;

            case InventoryFilters.vanity:
                list.Add(ItemType.vanity);
                break;

            case InventoryFilters.material:
                list.Add(ItemType.material);
                break;

            case InventoryFilters.tribute:
                list.Add(ItemType.tribute);
                break;

            case InventoryFilters.tattoo:
                list.Add(ItemType.tattoo);
                break;

            case InventoryFilters.other:
                list.Add(ItemType.potion);
                list.Add(ItemType.gem);
                list.Add(ItemType.recipe);
                break;
            }
            SelectHandler(list);
            _selectedTab = filter;
        }
    }
コード例 #5
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);
        }
    }