void Awake() { if (S == null) { S = this; } else { Destroy(this.gameObject); } dialogueRunner = FindObjectOfType <DialogueRunner> (); StartedDialogue = new UnityEvent(); EndedDialogue = new UnityEvent(); StartedDialogue.AddListener(() => Debug.Log(this.name + ": started displaying text!")); EndedDialogue.AddListener(() => Debug.Log(this.name + ": Dialogue ended!")); }
public void Init(DialogueUITest dialogueUIBehaviour) { // sets which dialogue ui behaviour this option set corresponds to dialogueUI = dialogueUIBehaviour; }
void GetDialogueComponents() { variableStorage = GetComponent <VariableStorageBehaviour>(); dialogueRunner = GetComponent <DialogueRunner>(); dialogueUI = GetComponent <DialogueUITest>(); }