IEnumerator CountdownStart() { while (countdownTime > 0) { countdowntext.text = countdownTime.ToString(); yield return(new WaitForSeconds(1f)); countdownTime--; } countdowntext.text = "GO!"; Fc = FindObjectOfType <FocusColor>(); yield return(new WaitForSeconds(1f)); focus.SetActive(true); Fc.gamestart = true; Fc.ChangeColors(); countdowntext.gameObject.SetActive(false); }
void Start() { Fc = FindObjectOfType <FocusColor>(); theSprite = GetComponent <SpriteRenderer>(); }