public void revealedCard(CircleCard card) { if (firstCard == null) { firstCard = card; } else { secondCard = card; StartCoroutine(checkMatch()); } }
private IEnumerator checkMatch() { if (firstCard.id == secondCard.id) { score++; label.text = "Score: " + score; } else { yield return(new WaitForSeconds(.8f)); firstCard.unreveal(); secondCard.unreveal(); } firstCard = null; secondCard = null; checkForWin(); }