public void Activate(Activateable act) { CurrentActivateable = act; Enabled = false; CurrentActivateable.PopActivator(this); Action.Invoke(); }
private void OnTriggerExit(Collider other) { var act = other.gameObject.GetComponentInChildren <Activateable>() ?? other.gameObject.GetComponentInParent <Activateable>(); if (act) { act.PopActivator(this); } CurrentActivateable = null; }