コード例 #1
0
    // This needs work
    private IEnumerator checkCardType()
    {
        yield return(new WaitForSeconds(.5f));

        firstReveal.Unreveal();

        firstReveal  = null;
        secondReveal = null;
        allow        = true;
    }
コード例 #2
0
    private IEnumerator checkIDs()
    {
        if (firstReveal.getId() == secondReveal.getId())
        {
            int playThisOne = Random.Range(0, congratulations.Length); // randomize the sounds played each time
            playAudio.PlayOneShot(congratulations[playThisOne]);
            score++;
            Debug.Log("Score: " + score);
            if (score == userChoicePictures.Count)
            {
                Debug.Log("u win"); //
            }
        }
        else
        {
            yield return(new WaitForSeconds(.5f));

            firstReveal.Unreveal();
            secondReveal.Unreveal();
        }
        firstReveal  = null;
        secondReveal = null;
    }