public IEnumerator ShowWhenDone() { yield return(new WaitForSeconds(.7F)); foreach (GameObject g in correctOrder) { SayButton sb = g.GetComponent <SayButton>(); sb.StartCoroutine(sb.LightUp(3)); } }
public IEnumerator ShowOrder() { if (!showingOrder) { showingOrder = true; foreach (GameObject g in correctOrder) { //Make bool to not have lots of thingies yield return(new WaitForSeconds(lightUpTime)); SayButton sb = g.GetComponent <SayButton>(); sb.StartCoroutine(sb.LightUp(lightUpTime)); } showingOrder = false; } }