void OnTriggerEnter2D(Collider2D col) { if (col.tag == "Player") { myInteract = true; i = -1; m_Dialogue.text = ""; myPlayer = col.GetComponent <Player_Movement_Script>(); } }
void OnTriggerExit2D(Collider2D col) { if (col.tag == "Player") { myInteract = false; if (myPlayer == col.GetComponent <Player_Movement_Script>()) { myPlayer = null; } } }