Exemplo n.º 1
0
        private IEnumerator _ResumeOnClick()
        {
            Time.timeScale = 1;
            pauseMenuAnimator.Play(resumeAnim);
            yield return(new WaitForSeconds(pauseMenuAnimator.GetCurrentAnimatorStateInfo(0).length));

            pauseMenuContainer.SetActive(false);
            PlayerLookV2.ToggleLooking(true);
            menuOpen = false;
        }
Exemplo n.º 2
0
 private IEnumerator _EscapeOnClick()
 {
     PlayerLookV2.ToggleLooking(false);
     menuOpen = true;
     pauseMenuContainer.SetActive(true);
     pauseMenuAnimator.Play(pauseAnim);
     for (int i = 0; i < 20; i++)               // one of those cases where getting state doesnt wanna work for no reason...
     {
         yield return(new WaitForEndOfFrame()); // anim is 20 frames :/
     }
     Time.timeScale = 0;
 }