Example #1
0
    // Initiate the card visuals after drawing
    private IEnumerator DrawCardVisual()
    {
        yield return(StartCoroutine(drawButton.InitiateCardOpen()));

        int count = 0;

        while (count < 10)
        {
            drawnCards[count].GetComponent <Animator>().enabled = true;
            yield return(new WaitForSeconds(0.3f));

            drawnCards[count].gameObject.SetActive(true);
            if (count < 8)
            {
                drawnCards[count].UpdateInfo();
                drawnCards[count].GetComponent <Animator>().SetBool("Unveal", true);
            }
            rarityIndex = count;
            count++;
        }
        yield return(new WaitForSeconds(.3f));

        yield return(null);
    }