Ejemplo n.º 1
0
 public void SetCards(List <ActionCard> cards, List <ActionCard> selected)
 {
     foreach (var ui_card in Cards.ToArray())
     {
         ReturnPool(ui_card);
     }
     foreach (var card in cards)
     {
         var ui_card = getCardFromPool();
         AddChild(ui_card);
         ui_card.SetCard(card);
         Cards.Add(ui_card);
         ui_card.onClick.Set(() =>
         {
             OnCardClick.Call(ui_card);
         });
     }
     for (int i = 0; i < Cards.Count; i++)
     {
         Cards[i].x = 185 * i;
         Cards[i].y = selected.Contains(Cards[i].Card) ? -20 : 0;
     }
 }
Ejemplo n.º 2
0
 public static void emit(Event ev)
 {
     EventListener.Call(ev);
 }