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; } }
public SpeakingLine(string speaker, string lineText, int lineNumber) { content = new SpeakingLineContent(speaker, lineText, lineNumber); speakerAnimator = GameObject.Find(speaker).GetComponent <DialogueAnimator>(); }