public void TriggerDialogue() { Debug.Log("here we are"); UI_manager.ShowDialogueBox(); //check if jelly is celebrating for CT too FindObjectOfType <DialogueManager>().StartDialogue(dialogue, gameObject); }
// Update is called once per frame void Update() { //Debug.Log("CT count: " + ct_count); if (dialogue_index < dialogue_index_max) { if (ct_count == dialogue_CT_count[dialogue_index]) { UI_manager = GameObject.FindGameObjectWithTag("UIManager").GetComponent <UI_healthbar>(); UI_manager.ShowDialogueBox(); FindObjectOfType <DialogueManager>().StartDialogue(dialogues[dialogue_index], gameObject); dialogue_index += 1; } } }