private IEnumerator SetRate() { _animator.SetBool("isPlaying", true); yield return(new WaitForSeconds(5)); if (_shaked) { _caps.SetRate(55); _textRate.text = "55x"; _animatorRate.SetBool("isPlaying", true); Invoke("EndEvent", 15); } else { _caps.SetDefaultRate(); } _animator.SetBool("isPlaying", false); StartCoroutine(Restart()); }