Answers for "updating float variable inside ienumerator if statement"

0

updating float variable inside ienumerator if statement

private bool isTyping = false;

void Update () {
    if (MaxyMory.activeInHierarchy == false && isTyping == false) {
        isTyping = true;
        StartCoroutine (type ());
    }
}

IEnumerator type () {
        foreach (char letters in sentences[index]) {
            textDisplay.text += letters;
            yield return new WaitForSeconds (typingSpeed);
        }
        isTyping = false;
    }
}
Posted by: Guest on July-12-2021

Code answers related to "updating float variable inside ienumerator if statement"

Browse Popular Code Answers by Language