1 using System.Collections;
2 using System.Collections.Generic;
5 public class DialogueTrigger : MonoBehaviour
8 GameObject DialogueManager;
14 dialogue = DialogueManager.GetComponent<Dialogue>();
17 private void OnTriggerEnter2D(Collider2D collision)
19 if(collision.gameObject.CompareTag("Player"))
21 StartCoroutine(dialogue.Type());
22 collision.gameObject.GetComponent<Rigidbody2D>().constraints = RigidbodyConstraints2D.FreezeAll;
23 collision.gameObject.GetComponent<MouseController>().enabled = false;
24 GetComponent<BoxCollider2D>().enabled = false;
32 StopCoroutine(dialogue.Type());
34 dialogue.skip = false;