Esempio n. 1
0
    private IEnumerator CheckMatch()
    {
        if (_firstRevealed.id == _secondRevealed.id)
        {
            playAudio.PlaySuccessClip();
            score++;
            scoreLabel.text = "Score: " + score;
        }
        else
        {
            yield return(new WaitForSeconds(.5f));

            _firstRevealed.Unreveal();
            _secondRevealed.Unreveal();
        }

        _firstRevealed  = null;
        _secondRevealed = null;
    }