Exemple #1
0
    IEnumerator LevelStartupSequence()
    {
        GameObject instructions = GameObject.FindGameObjectWithTag("Instructions");

        while (fadeImage && fadeImage.color.a > .005)
        {
            fadeImage.color = new Color(fadeImage.color.r, fadeImage.color.b, fadeImage.color.g, fadeImage.color.a - .0075f);
            yield return(null);
        }

        if (!instructions)
        {
            Debug.LogError("Something's wrong, we can't find the instructions UI");
        }
        else
        {
            NotesUI notesUI = instructions.GetComponent <NotesUI>();
            if (notesUI)
            {
                notesUI.OpenNoteCard();
            }
        }
    }