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
 public void Init(Camera camera, FirstPersonController controller)
 {
     this.camera       = camera;
     this.cameraFading = FadingManager.GetInstance();
     this.controller   = controller;
     roomsManager      = RoomsManager.GetManager();
 }
    private IEnumerator GameLoading_impl()
    {
        FadingManager.GetInstance().SetFadedToBlack();
        PauseGame();
        Time.timeScale = 1.0f;
        yield return(new WaitUntil(() => SceneManager.GetSceneByName("Prologue").isLoaded&& SceneManager.GetSceneByName("Hall").isLoaded));

        Dispatcher.GetInstance().SendEvent(new EBEvent()
        {
            type = EBEventType.GameLoaded
        });
        FadingManager.GetInstance().FadeToNormal(4.0f);
    }
예제 #4
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");
    }