void Update() { if (!isKey) { if (Input.anyKey) { // changeCursorScript.showCursor = true; changeCursorScript.SetCursorVisible(true); lightThunder.SetActive(true); anim.SetTrigger("thunder"); audioS.clip = thunderAudio; audioS.Play(); StartCoroutine(WaitForSound(thunderAudio.length)); isKey = true; pressKey.SetActive(false); menu.SetActive(true); } } else { Thunder(); } if ((anim.GetCurrentAnimatorStateInfo(0).normalizedTime >= 0.815f && !anim.IsInTransition(0)) && isKey) { lightTitle.SetActive(true); music.SetActive(true); } }