Ejemplo n.º 1
0
    public override void OnClick(CardView card)
    {
        if (currentPlayer.Get() == card.cardInstance.owner && localPlayer == currentPlayer.Get())
        {
            if (currentCardView.Get() == null)
            {
                currentCardView.Set(card.gameObject);
                currentCardView.Get().ToggleActive();
            }
            else
            {
                currentCardView.Get().ToggleActive();

                if (currentCardView.Get() == card)
                {
                    currentCardView.Set(null);
                }
                else
                {
                    currentCardView.Set(card.gameObject);
                    currentCardView.Get().ToggleActive();
                }
            }
        }
    }
Ejemplo n.º 2
0
 public void DrawCard(CardInstance cardInstance)
 {
     if (owner == currentPlayer.Get())
     {
         cardInitializer.SpawnCard(cardInstance);
     }
 }
Ejemplo n.º 3
0
 public void ShowInfo()
 {
     Debug.Log("Show info");
     infoText.GetComponent <Text>().text = currentPlayer.Get().name + " turn";
     StartCoroutine(Visualize());
 }