Exemplo n.º 1
0
    public override void Init(Wave wave)
    {
        int totalTipCount = wave.tipNumber;

        if (totalTipCount <= 12)
        {
            fullBlockDisplayTime = totalTipCount * 0.6f / 12 + 0.4f;
        }
        else
        {
            fullBlockDisplayTime = 1;
        }
        wordLength = Mathf.Clamp(wave.tipNumber, 0, MAX_WORD_LENGTH);
        wordData   = WordData.GetRandomWord(wordLength);
        wordChars.Clear();
        tempChars.Clear();
        wordChars.AddRange(wordData.word.ToCharArray());
        tempChars.AddRange(wordChars);

        correctCharCount = 0;
        RefreshWordText();

        if (OnWordTextChanged != null)
        {
            OnWordTextChanged();
        }
    }