Esempio n. 1
0
    public ChoiceLine(string speaker, List <ChoiceLineContent> choices)
    {
        dialogueChoices = choices;

        // very per game specific stuff, only the player can change have the choice dialogue appear over them
        try
        {
            // very per game specific stuff
            speakerAnimator = GameObject.Find(speaker).GetComponent <DialogueAnimator>();
        }
        catch (Exception e)
        {
            throw new Exception($"Cannot determine speaker '{speaker}'", e);
        }

        if (choices.Any(x => x.jumpLabel == "leave"))
        {
            chosenOptionIndex = dialogueChoices.Count - 1;
        }
    }
Esempio n. 2
0
    public SpeakingLine(string speaker, string lineText, int lineNumber)
    {
        content = new SpeakingLineContent(speaker, lineText, lineNumber);

        speakerAnimator = GameObject.Find(speaker).GetComponent <DialogueAnimator>();
    }