Ejemplo n.º 1
0
    public override void OnEnter()
    {
        setSayDialog = SayDialog.GetSayDialog("RightDialog");
        LeftSay      = (GridFightSayDialog)SayDialog.GetSayDialog("LeftDialog");
        if (!showAlways && executionCount >= showCount)
        {
            Continue();
            return;
        }

        executionCount++;

        // Override the active say dialog if needed
        if (character != null && character.SetSayDialog != null)
        {
            SayDialog.ActiveSayDialog = character.SetSayDialog;
        }

        if (setSayDialog != null)
        {
            SayDialog.ActiveSayDialog = setSayDialog;
        }

        var sayDialog = SayDialog.GetSayDialog();

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

        var flowchart = GetFlowchart();

        sayDialog.SetActive(true);

        sayDialog.SetCharacter(character);


        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);


        StartCoroutine(Say_Continue(sayDialog, subbedText));
    }
Ejemplo n.º 2
0
    public override void OnEnter()
    {
        setSayLeftDialog  = (GridFightSayDialog)SayDialog.GetSayDialog("LeftDialog");
        setSayRightDialog = (GridFightSayDialog)SayDialog.GetSayDialog("RightDialog");

        setSayLeftDialog.SayDialogAnimatorController.SetBool("InOut", false);
        setSayRightDialog.SayDialogAnimatorController.SetBool("InOut", false);
        setSayLeftDialog.LastCharacter  = null;
        setSayRightDialog.LastCharacter = null;
        Continue();
    }