Advertisement
Guest User

Untitled

a guest
Feb 10th, 2021
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.64 KB | None | 0 0
  1. [SerializeField]
  2. private Transform _cardsPanel;
  3.  
  4.  
  5. private void LoadCards()
  6.         {
  7.             foreach(Transform slot in _cardsPanel)
  8.             {
  9.                 var card = slot.transform.GetChild(0);
  10.                 if(card != null)
  11.                 {
  12.                     card.TryGetComponent<Card>(out var cardComp);
  13.                     if (_operativesToTask.Contains(cardComp.ThisOperative) == false)
  14.                     {
  15.                         Debug.Log(cardComp.ThisOperative.operativeName);
  16.                         _operativesToTask.Add(cardComp.ThisOperative);
  17.                     }
  18.                 }
  19.             }
  20.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement