void Start() { _dialogueRunner = FindObjectOfType <GameHandler>().dialogueRunner; _speakerSystem = FindObjectOfType <SpeakerSystem>(); // Initialize the Yarn commands _dialogueRunner.AddCommandHandler(_showCommandName, Show); _dialogueRunner.AddCommandHandler(_hideCommandName, Hide); _dialogueRunner.AddCommandHandler(_moveCommandName, Move); _dialogueRunner.AddCommandHandler(_flipCommandName, Flip); _dialogueRunner.AddCommandHandler(_scaleCommandName, Scale); _dialogueRunner.AddCommandHandler(_setSpeakerEmoteCommandName, SetEmote); }
private void Awake() { _canvasGroup = GetComponent <CanvasGroup>(); _speakerSystem = GetComponentInParent <SpeakerSystem>(); }