Esempio n. 1
0
 private void PawnClicked()
 {
     if (PanelPawn != null)
     {
         if (Controller != null)
         {
             Controller.PawnClicked(PanelPawn.GetComponent <Pawn> ().Name);
         }
         if (CardsControllerComp != null)
         {
             CardsControllerComp.RemoveCard(PanelPawn.GetComponent <Pawn> ().Name);
             Destroy(this.gameObject);
         }
     }
 }
Esempio n. 2
0
 public void OnClick()
 {
     if (CardsControllerComp != null)
     {
         CardsControllerComp.CardClicked(this.GetComponent <CardPanel>());
     }
     if (Card != null && BuildDeckMode)
     {
         if (PanelInDeck)
         {
             CardsControllerComp.RemoveCard(Card.GetComponent <CardInteraction> ().CardName);
         }
         else
         {
             CardsControllerComp.AddCardToDeck(Card.GetComponent <CardInteraction> ().CardName, this.transform.position);
         }
     }
     else
     {
         CardsControllerComp.ShowCardHighlight(PanelCardName);
     }
 }