void OnTriggerExit(Collider other) { if (other.tag == "Interactable") { Interactable aux = other.GetComponent <Interactable>(); aux.Away(); if (currInter == aux) { currInter = null; } } }
void OnTriggerEnter(Collider other) { if (other.tag == "Interactable") { if (currInter != null) { currInter.Away(); } currInter = other.GetComponent <Interactable>(); currInter.Near(); } }