private IEnumerator StartGame_impl()
    {
        FadingManager.GetInstance().FadeToBlack(2.0f);
        yield return(new WaitForSeconds(2.0f));

        mainMenuCameraHolder.SetActive(false);
        controller.gameObject.SetActive(true);
        controller.SetCursorLock(true);

        Dispatcher.GetInstance().SendEvent(new EBEvent()
        {
            type = EBEventType.GameStarted
        });

        TextOutput textOutput = TextOutput.GetInstance();

        textOutput.ShowText(TextManager.GetIntroText(), TextOutput.TextAreaSize.Big);
        yield return(new WaitWhile(() => textOutput.IsActive()));

        FadingManager.GetInstance().FadeToNormal(3.0f);
        yield return(new WaitForSeconds(1.0f));

        ResumeGame();
        isPauseAllowed = true;
    }
Пример #2
0
    private IEnumerator ShowQuote()
    {
        gameFlowManager.SetPauseAllowed(false);
        gameFlowManager.SetKeepMouseLock(true);
        gameFlowManager.PauseGame(false);
        textOutput.ShowText(TextManager.GetQuote(), TextOutput.TextAreaSize.Small);
        yield return(new WaitWhile(() => textOutput.IsActive()));

        gameFlowManager.SetPauseAllowed(true);
        gameFlowManager.SetKeepMouseLock(false);
        gameFlowManager.ResumeGame(false);
    }
Пример #3
0
    private IEnumerator EndingAnimation()
    {
        controller.enabled = false;
        monster.GetComponent <MonsterBehaviour>().SetPatrolEnabled(false);
        FadingManager.GetInstance().FadeToBlack(5);
        yield return(FadeOutMonsterSounds(5));

        TextOutput textOutput = TextOutput.GetInstance();

        textOutput.ShowText(TextManager.GetBadEndingText(), TextOutput.TextAreaSize.Small);
        yield return(new WaitWhile(() => textOutput.IsActive()));

        UnityEngine.SceneManagement.SceneManager.LoadScene("Main");
    }
    private IEnumerator Animation()
    {
        RenderSettings.fog = false;
        camera.gameObject.GetComponent <UnityStandardAssets.CinematicEffects.AmbientOcclusion>().enabled = false;
        light.SetActive(true);
        controller.SetMouseLookEnabled(false);
        controller.SetHeadBobEnabled(false);
        controller.enabled = false;
        birds.Play();
        director.StartAnimating(camera, rotationTarget, movementTarget);
        yield return(new WaitUntil(() => director.IsFinished()));

        yield return(new WaitForSeconds(1.0f));

        TextOutput textOutput = TextOutput.GetInstance();

        textOutput.ShowText(TextManager.GetGoodEndingText(), TextOutput.TextAreaSize.Small);
        yield return(new WaitWhile(() => textOutput.IsActive()));

        UnityEngine.SceneManagement.SceneManager.LoadScene("Main");
    }