コード例 #1
0
ファイル: Novella.cs プロジェクト: Alexandrus17/GameDiplom
    public override void OnEnter()
    {
        if (!showAlways && executionCount >= showCount)
        {
            Continue();
            return;
        }

        executionCount++;

        if (character != null && character.SetNovellaDialog != null)
        {
            NovellaDialog.ActiveNovellaDialog = character.SetNovellaDialog;
        }

        if (setNovellaDialog != null)
        {
            NovellaDialog.ActiveNovellaDialog = setNovellaDialog;
        }

        var NovellaDialog = NovellaDialog.GetNovellaDialog();

        if (NovellaDialog == null)
        {
            Continue();
            return;
        }

        var flowchart = GetFlowchart();

        NovellaDialog.SetActive(true);

        NovellaDialog.SetCharacter(character);
        NovellaDialog.SetCharacterImage(portrait);

        string displayText = storyText;

        var activeCustomTags = CustomTag.activeCustomTags;

        for (int i = 0; i < activeCustomTags.Count; i++)
        {
            var ct = activeCustomTags[i];
            displayText = displayText.Replace(ct.TagStartSymbol, ct.ReplaceTagStartWith);
            if (ct.TagEndSymbol != "" && ct.ReplaceTagEndWith != "")
            {
                displayText = displayText.Replace(ct.TagEndSymbol, ct.ReplaceTagEndWith);
            }
        }

        string subbedText = flowchart.SubstituteVariables(displayText);

        NovellaDialog.Novella(subbedText, !extendPrevious, waitForClick, fadeWhenDone, stopVoiceover, waitForVO, voiceOverClip, delegate {
            Continue();
        });
    }
コード例 #2
0
ファイル: Novella.cs プロジェクト: Alexandrus17/GameDiplom
    public override void OnStopExecuting()
    {
        var NovellaDialog = NovellaDialog.GetNovellaDialog();

        if (NovellaDialog == null)
        {
            return;
        }

        NovellaDialog.Stop();
    }