Ejemplo n.º 1
0
 public void FadeToScene(string scene_ = null)
 {
     StartCoroutine(_cg.FadeInCG(_fadeDuration, true));
     if (scene_ != null)
     {
         StartCoroutine(LoadAsync(scene_));
     }
 }
Ejemplo n.º 2
0
 public void GameOverMenu(bool openMenu_)
 {
     if (!_menuOpen && openMenu_)
     {
         _cg.blocksRaycasts = true;
         Time.timeScale     = 0;
         StartCoroutine(_cg.FadeInCG(1.2f, true));
         _menuOpen = true;
     }
     else if (!openMenu_ && _menuOpen)
     {
         _cg.blocksRaycasts = false;
         Time.timeScale     = 1;
         StartCoroutine(_cg.FadeOutCG(1.2f, true));
         _menuOpen = false;
     }
 }
Ejemplo n.º 3
0
 public void ToggleSettings(bool openMenu_)
 {
     if (openMenu_ && !_menuOpen)
     {
         _cg.blocksRaycasts = true;
         Time.timeScale     = 0.0f;
         _menuOpen          = true;
         StartCoroutine(_cg.FadeInCG(0.2f, true));
         StartCoroutine(PlayerInput());
     }
     else if (!openMenu_ && _menuOpen)
     {
         StartCoroutine(_cg.FadeOutCG(0.2f, true));
         Time.timeScale     = 1;
         _cg.blocksRaycasts = false;
         _menuOpen          = false;
         StopCoroutine(PlayerInput());
     }
 }