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(); } } } }
public void DrawCard(CardInstance cardInstance) { if (owner == currentPlayer.Get()) { cardInitializer.SpawnCard(cardInstance); } }
public void ShowInfo() { Debug.Log("Show info"); infoText.GetComponent <Text>().text = currentPlayer.Get().name + " turn"; StartCoroutine(Visualize()); }