Beispiel #1
0
 IEnumerator MotherFadeCoroutine(float delay, Level levelRef = null, bool redColor = false, string loadLeveL = "NONE", int steps = 10, float rate = 0.1f)
 {
     for (int i = 0; i < steps; i++)
     {
         yield return(StartCoroutine(FadeScreen(delay, rate)));
     }
     if (levelRef)
     {
         if (!redColor)
         {
             if (loadLeveL == Constantes.NONE)
             {
                 levelRef.loadTryAgainPosFade();
             }
             else
             {
                 SelectLevelToLoad(levelRef, loadLeveL);
             }
         }
         else
         {
             levelRef.LoadGameOverPosFade();
         }
     }
     MouseVisibility.ShowCursor();
 }
Beispiel #2
0
 void Awake()
 {
     try{
         MouseVisibility.HideCursor();
         setReferences();
         SetPlayerHealth();            //seta a vida em PlayerStatus.cs
     }catch (System.Exception e) {
         Debug.LogWarning(e);
     }
 }
Beispiel #3
0
 private void Pause()
 {
     if (pauseMenuUI)
     {
         if (audioManager)
         {
             audioManager.PauseAudio();
         }
         pauseMenuUI.SetActive(true);
         Time.timeScale = 0f;
         gamePause      = true;
         MouseVisibility.ShowCursor();
     }
 }
Beispiel #4
0
 public void Resume()
 {
     if (pauseMenuUI)
     {
         if (audioManager)
         {
             audioManager.ResumeAudio();
         }
         pauseMenuUI.SetActive(false);
         Time.timeScale = 1f;
         gamePause      = false;
         MouseVisibility.HideCursor();
     }
 }