Esempio n. 1
0
    IEnumerator AnimateText(string strComplete)
    {
        int i = 0;

        str = "";
        Debug.Log("TexWrite starting:" + strComplete.Length);
        while (i < strComplete.Length)
        {
            //Debug.Log("Writing text:" + i + "/" + strComplete.Length);
            str      += strComplete[i++];
            text.text = str;
            yield return(new WaitForSeconds(textWait));
        }
        Debug.Log("TexWrite finished");

        yield return(new WaitForSeconds(destroyWait));

        mem.memoryEnded();

        Destroy(this.gameObject);
    }