示例#1
0
    private IEnumerator SpawnLetters(List <Letter> letterList, LevelInfo data)
    {
        foreach (var item in letterList)
        {
            item.gameObject.GetComponent <Image>().enabled          = true;
            item.gameObject.GetComponentInChildren <Text>().enabled = true;
            item.gameObject.GetComponent <Animation>().Play("FadeIn");
            yield return(new WaitForSeconds(0.06f)); //Wait a bit to make a dominoes effect for letters
        }
        yield return(new WaitForSeconds(0.4f));

        //Handle if some hints already been used earlier
        if (data.lettersOppened != 0)
        {
            int i = data.lettersOppened;
            do
            {
                StaticBehaviors.RevealLetter(letterFieldsList, letterList, LevelManager.rightAnswerList);
                i--;
            } while (i != 0);
        }
        if (data.isLettersRemoved)
        {
            StaticBehaviors.RemoveWrongLetters(letterFieldsList, letterList, LevelManager.rightAnswerList);
        }

        LevelManager.isPaused = false;
    }