/// <summary> /// Closed the door when an actor leaves the trigger area. /// </summary> /// <param name="_args"></param> private void OnTriggerExited(OnTriggerExited _args) { if (openCloseTrigger == _args.trigger) { CloseDoor(); } }
/// <summary> /// Checks if the player exited the trigger in order to show the sprite. /// </summary> /// <param name="_args">On trigger exited args.</param> private void OnTriggerExited(OnTriggerExited _args) { if (hideTrigger == _args.trigger) { if (_args.actor.CompareTag("Player")) { OnHideTriggerExited(); } } }
void OnTriggerExit(Collider other) { OnTriggerExited?.Invoke(other, this); }