void OnCollisionEnter2D(Collision2D coll) { if (coll.gameObject.tag == "Player") { if (!dialogUI.activeSelf) { dialogUI.SetActive(true); } Debug.Log("Player Entered"); dialogCollider.enabled = false; dialogTrigger.TriggerDialogue(); } }
void StartDialog(GameObject peasant) { dialogTrigger = peasant.AddComponent <DialogTrigger>(); dialogTrigger.Spawn(); dialogTrigger.TriggerDialogue(); }