private void OnTap(Card card) { if (GameMng.GetActivePlayer() != player) { return; } if (card.tapped) { return; } // Only creatures can be tapped if (card.desc.type != CardDesc.Type.Creature) { return; } card.Tap(); if (GameMng.GetRules().attackOnTap) { player.RunAttack(card); } }
public void ClickedCard() { // Check if we're on a targeting mode Player activePlayer = GameMng.GetActivePlayer(); if (activePlayer.IsTargeting()) { activePlayer.RunAction(this); return; } OnClick?.Invoke(this); }