void OnMouseUp() { if (Fc.gamestart) { Fc.CheckIfCorrect(pressedcolor); Fc.RandomMovement(); Fc.ChangeColors(); } }
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); }