Пример #1
0
 public void cardRevealead(OriginalCard4 card)
 {
     if (firstCard == null)
     {
         firstCard = card;
     }
     else
     {
         secondCard = card;
         StartCoroutine(matchCheck());
     }
 }
Пример #2
0
    IEnumerator matchCheck()
    {
        if (firstCard.getId == secondCard.getId)
        {
            score++;
            gameFinished();
        }
        else
        {
            yield return(new WaitForSeconds(0.5f));

            firstCard.unreveal();
            secondCard.unreveal();
        }

        firstCard  = null;
        secondCard = null;
    }