Esempio n. 1
0
    void Update()
    {
        if (Time.time >= nextTime)
        {
            curOffset++;
            curOffset    = Mathf.Clamp(curOffset, 0, text.Length);
            normalString = text.Substring(0, curOffset);
            nextTime     = Time.time + intervalTime;
        }

        jumbledString = "[969696]";

        for (int i = curOffset; i < text.Length; i++)
        {
            if (text[i] == ' ')
            {
                jumbledString += " ";
            }
            else
            {
                jumbledString += DarkRef.GetRandomLetter();
            }
        }

        jumbledString += "[-]";

        label.text = normalString + jumbledString;
    }