public override void ActivateSwitch(bool b)
 {
     if (b)
     {
         GlobalController.AddGameFlag(this.flagName);
     }
 }
Example #2
0
    public void RenderDialogueLine(DialogueLine line, bool hasMoreLines, bool fromCutscene = false)
    {
        anim.SetBool("IsSign", line.speakerImage == null);
        anim.SetBool("LastLine", !hasMoreLines);
        if (line.speakerImage != speakerImage.sprite && line.speakerName != speakerName.text && !fromCutscene)
        {
            nextImage = line.speakerImage;
            if (!switchingImage)
            {
                // anim.SetTrigger("SwitchSpeakerImage");
                SwitchSpeakerImage();
            }
        }
        else
        {
            speakerImage.sprite = line.speakerImage;
        }
        speakerName.text = line.speakerName;
        this.voiceIndex  = (int)line.voiceSound;
        string controllerFriendlyText = ControllerTextChanger.ReplaceText(line.lineText);

        StartSlowRender(controllerFriendlyText);

        if (line.gameFlag != GameFlag.None)
        {
            GlobalController.AddGameFlag(line.gameFlag);
        }
    }
Example #3
0
    public void RenderDialogueLine(DialogueLine line, bool fromCutscene = false)
    {
        //if the speaker name and portrait differ, start the animation for the portrait change
        if (line.speakerImage != speakerImage.sprite && line.speakerName != speakerName.text && !fromCutscene)
        {
            nextImage = line.speakerImage;
            if (!switchingImage)
            {
                anim.SetTrigger("SwitchSpeakerImage");
            }
        }
        else
        {
            speakerImage.sprite = line.speakerImage;
        }
        speakerName.text = line.speakerName;
        this.voiceIndex  = (int)line.voiceSound;
        StartSlowRender(line.lineText);

        if (line.gameFlag != GameFlag.None)
        {
            GlobalController.AddGameFlag(line.gameFlag);
        }
    }
Example #4
0
 public void GameFlag(GameFlag flag)
 {
     GlobalController.AddGameFlag(flag);
 }