Exemple #1
0
    IEnumerator IntroSequence()
    {
        if (PlayOpeningBanter)
        {
            ChapterHud.instance.StartLevel();
            while (!ChapterHud.instance.AnimationFinished())
            {
                yield return(null);
            }

            BgmController.instance.PlayBGM(levelBgm);

            List <string> dialogEntries = DialogEngine.CreateDialogComponents(openingBanter.text);
            ShmupGameManager.instance.PauseGameplay();
            ConversationController.instance.StartConversation(dialogEntries);
            yield return(null);

            while (ShmupGameManager.instance.Paused)
            {
                yield return(null);
            }
        }

        ShmupGameManager.instance.ResumeGameplay();
        ShmupGameManager.instance.player.gameObject.SetActive(true);
        ShmupGameManager.instance.RespawnPlayer();
    }
Exemple #2
0
    public IEnumerator StartConversation(TextAsset dialog, bool withPortraits)
    {
        List <string> dialogEntries = DialogEngine.CreateDialogComponents(dialog.text);

        ConversationController.instance.StartConversation(dialogEntries);
        yield return(null);
    }
Exemple #3
0
    public IEnumerator StartConversation(TextAsset dialog, bool withPortraits)
    {
        if (pauseGameplay)
        {
            ShmupGameManager.instance.PauseGameplay();
        }

        List <string> dialogEntries = DialogEngine.CreateDialogComponents(dialog.text);

        ConversationController.instance.StartConversation(dialogEntries);
        yield return(new WaitForEndOfFrame());

        while (!ConversationController.instance.IsConversationFinished())
        {
            yield return(null);
        }

        if (pauseGameplay)
        {
            ShmupGameManager.instance.ResumeGameplay();
        }

        conversationOver = true;
        yield return(null);
    }
Exemple #4
0
 private void Update()
 {
     if (spaceInvaderWave.started && !spaceInvaderDialogStarted)
     {
         spaceInvaderDialogStarted = true;
         List <string> dialogEntries = DialogEngine.CreateDialogComponents(spaceInvaderBanter.text);
         ConversationController.instance.StartConversation(dialogEntries);
     }
     if (mainEncounter.IsCompleted())
     {
         EndLevel();
     }
 }
Exemple #5
0
    public IEnumerator PlayCutscene(TextAsset dialog, bool withPortraits, float autoPlay = 0.0f)
    {
        CutscenePause();

        List <string> dialogEntries = DialogEngine.CreateDialogComponents(dialog.text);

        CutsceneDialogController.instance.StartCutscene(dialogEntries, autoPlay);

        while (!CutsceneDialogController.instance.IsCutsceneFinished())
        {
            yield return(null);
        }

        CutsceneUnpause();
        yield return(null);
    }
Exemple #6
0
    IEnumerator EndSequence()
    {
        List <string> dialogEntries = DialogEngine.CreateDialogComponents(closingBanter.text);

        ShmupGameManager.instance.PauseGameplay();
        ConversationController.instance.StartConversation(dialogEntries);
        yield return(null);

        while (ShmupGameManager.instance.Paused)
        {
            yield return(null);
        }

        BgmController.instance.StopBGM();

        ChapterHud.instance.EndLevel();
        while (!ChapterHud.instance.AnimationFinished())
        {
            yield return(null);
        }
        SceneManager.LoadScene(3);
    }
    IEnumerator IntroSequence()
    {
        AudioManager.instance.OnPhase3LevelFadeIn();
        ChapterHud.instance.StartLevel();
        while (!ChapterHud.instance.AnimationFinished())
        {
            yield return(null);
        }

        if (PlayOpeningBanter)
        {
            List <string> dialogEntries = DialogEngine.CreateDialogComponents(openingBanter.text);
            ShmupGameManager.instance.PauseGameplay();
            ConversationController.instance.StartConversation(dialogEntries);
            yield return(null);

            while (ShmupGameManager.instance.Paused)
            {
                yield return(null);
            }
        }

        ShmupGameManager.instance.player.gameObject.SetActive(true);
        ShmupGameManager.instance.RespawnPlayer();
        ShmupGameManager.instance.ResumeGameplay();

        yield return(new WaitForSeconds(2.0f));

        List <string> lockEntries = DialogEngine.CreateDialogComponents(lockBanter.text);

        ConversationController.instance.StartConversation(lockEntries);
        yield return(null);

        while (ShmupGameManager.instance.Paused)
        {
            yield return(null);
        }
    }
    IEnumerator EndSequence()
    {
        AudioManager.instance.OnNextLevelUnlock();
        AudioManager.instance.OnPhaseAnyLevelFadeOut();

        List <string> dialogEntries = DialogEngine.CreateDialogComponents(closingBanter.text);

        ShmupGameManager.instance.PauseGameplay();
        ConversationController.instance.StartConversation(dialogEntries);
        yield return(null);

        while (ShmupGameManager.instance.Paused)
        {
            yield return(null);
        }

        ChapterHud.instance.EndLevel();
        while (!ChapterHud.instance.AnimationFinished())
        {
            yield return(null);
        }
        SceneManager.LoadScene(2);
    }
    IEnumerator IntroSequence()
    {
        AudioManager.instance.OnPhase1LevelFadeIn();
        if (PlayOpeningCutscene)
        {
            ChapterHud.instance.StartLevel();
            while (!ChapterHud.instance.AnimationFinished())
            {
                yield return(null);
            }
            //TextAsset dialog = ProgressManager.instance.GetStartDialog();
            StartCoroutine(ShmupGameManager.instance.PlayCutscene(openingCutscene, true));
            yield return(null);

            while (ShmupGameManager.instance.Paused)
            {
                yield return(null);
            }
        }

        if (PlayOpeningBanter)
        {
            List <string> dialogEntries = DialogEngine.CreateDialogComponents(openingBanter.text);
            ShmupGameManager.instance.PauseGameplay();
            ConversationController.instance.StartConversation(dialogEntries);
            yield return(null);

            while (ShmupGameManager.instance.Paused)
            {
                yield return(null);
            }
        }

        ShmupGameManager.instance.player.gameObject.SetActive(true);
        ShmupGameManager.instance.RespawnPlayer();
        ShmupGameManager.instance.ResumeGameplay();
    }