示例#1
0
    IEnumerator WaitForFade()
    {
        cinematicFade.FadeIn();
        yield return(new WaitForSeconds(1f));

        cinematicFade.FadeOut();
        PlayTimeline();
    }
示例#2
0
    public void PauseGame()
    {
        if (_isPaused || !PausingAllowed)
        {
            return;
        }

        _cachedTimeScale  = Time.timeScale;
        Time.timeScale    = 0f;
        _cachedCursorMode = Util.CursorMode.GetCurrent();
        Util.CursorMode.Default.Apply();
        PauseMenu.Menu.gameObject.SetActive(true);
        PauseMenu.Menu.SetVisible();
        if (GameManager.Instance.UsingGamepadControls())
        {
            PauseMenu.FirstSelected.Select();
            PauseMenu.FirstSelected.OnSelect(null);
        }
        PauseInterface.gameObject.SetActive(true);
        PauseInterface.FadeIn();
        FadePostProcessingWeight(1f, PostProcessingFadeSpeed);

        _currentMenu = PauseMenu;

        _isPaused = true;
    }
示例#3
0
    public void LoadNextScene()
    {
        if (fader)
        {
            fader.FadeIn();

            if (musicFader)
            {
                musicFader.FadeOut(0f, musicFader.fadeSpeed);
            }

            StartCoroutine(WaitToLoad(fadeWait, SceneManager.GetActiveScene().buildIndex + 1));
        }
        else
        {
            SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1);
        }
    }
示例#4
0
    private void Internal_ShowMessage(string message, float displayTime)
    {
        if (IsShowingMessage)
        {
            fader.FadeOut(() =>
            {
                text.text = message;
                fader.FadeIn();
                _timeLeftUntilFadeOut = displayTime;
            });
        }
        else
        {
            text.text = message;
            fader.FadeIn();
            _timeLeftUntilFadeOut = displayTime;
        }

        IsShowingMessage = true;
    }
示例#5
0
    IEnumerator ch()
    {
        black.SetActive(true);
        FadeUI.FadeIn(black);
        yield return(new WaitForSeconds(0.2f));

        toUnload.SetActive(false);
        toLoad.SetActive(true);
        FadeUI.FadeOut(black);
        yield return(new WaitForSeconds(0.2f));

        black.SetActive(false);
    }
    //actually starts
    void StartMonologue()
    {
        //enable text comps
        if (monoReader.usesTMP)
        {
            monoReader.the_Text.enabled = true;
        }
        else
        {
            monoReader.theText.enabled = true;
        }

        //textback
        if (textBack)
        {
            textBack.FadeIn();
            if (animateTextback)
            {
                animateTextback.active = true;
            }
        }

        //player ref
        GameCamera cam = camManager.currentCamera;

        //currentPlayer = cam.transform.parent.gameObject;

        //transition to mono cam
        if (monoCam != null)
        {
            camManager.Set(monoCam);
        }

        //lock player movement
        if (allMyMonologues[currentMonologue].lockPlayer)
        {
        }

        //begin mono
        inMonologue = true;

        //start the typing!
        monoReader.SetTypingLine();
    }
示例#7
0
    IEnumerator ch()
    {
        FadeUI.FadeIn(black);
        yield return(new WaitForSeconds(0.5f));

        if (toUnload != "")
        {
            SceneManager.UnloadSceneAsync(toUnload);
        }
        yield return(new WaitForSeconds(delayTime + 1f));

        FadeUI.FadeOut(black);
        if (toLoad != "")
        {
            SceneManager.LoadScene(toLoad, LoadSceneMode.Additive);
        }
        isChanging = false;
        yield return(new WaitForSeconds(0.4f));

        black.SetActive(false);
    }
示例#8
0
 public void OpenMenu()
 {
     fadeUI.FadeIn();
     Invoke("ChangeTimeScale", fadeUI.fadeTime + fadeUI.startDelay);
 }