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;
}
}