public void OnTriggerExit2D(Collider2D other) { if (other.CompareTag("Transition")) { active = false; currentLocation = null; ready = true; t = 0; } }
public void OnTriggerStay2D(Collider2D other) { if (ready) { if (other.CompareTag("Transition")) { active = true; currentLocation = other.transform.parent.GetComponent <TransitionLocation>(); isIgnored = currentLocation.isIgnored; transitionOnEnter = currentLocation.transitionOnEnter; } } }