public IEnumerator FilerInventory(ItemSubKind kind)
 {
     foreach (UIUpgradeItemSlot slot in _slots)
     {
         if (slot.item.GameItem.SubKind == (int)kind)
         {
             slot.gameObject.SetActive(true);
         }
         else
         {
             slot.gameObject.SetActive(false);
         }
     }
     slotRoot.Reposition();
     scrollView.ResetPosition();
     yield return(0);
 }
Exemplo n.º 2
0
    public void Filer(ItemSubKind kind)
    {
        foreach (UIHeroInventorySlot slot in _slots)
        {
            if (slot.userItem.GameItem.SubKind == (int)kind)
            {
                if (!slot.gameObject.activeSelf)
                {
                    slot.gameObject.SetActive(true);
                }
            }
            else if (slot.userItem.GameItem.SubKind != (int)kind)
            {
                if (slot.gameObject.activeSelf)
                {
                    slot.gameObject.SetActive(false);
                }
            }
        }

        uiInventory.scrollView.ResetPosition();
        uiInventory.root.Reposition();
    }