Пример #1
0
 //-------------- очищаем слоты инвентаря
 private void ClearInventory()
 {
     foreach (Transform child in _holderCards.transform)
     {
         if (child.transform.childCount <= 0)
         {
             continue;
         }
         _coroutiner.StartCoroutine(_objectStorage.ReturnInPool(ObjectTypeEnum.PrefabCardInInventory,
                                                                child.transform.GetChild(0).gameObject, 0.1f));
         var component = child.GetComponent <ActionsWithSlotInventory>();
         component.SetVarsSlot(true, false);
     }
     foreach (Transform child in _holderInventory.transform)
     {
         if (child.transform.childCount <= 0)
         {
             continue;
         }
         _coroutiner.StartCoroutine(_objectStorage.ReturnInPool(ObjectTypeEnum.PrefabCardInInventory,
                                                                child.transform.GetChild(0).gameObject, 0.1f));
         var component = child.GetComponent <ActionsWithSlotInventory>();
         component.SetVarsSlot(true, false);
     }
 }