예제 #1
0
 void OnTriggerStayEvent_OnTriggerStayed(TriggerEnterCollider sender, Collider other)
 {
     if (_triggeringTags.Contains(other.tag))
     {
         TriggerEvent();
     }
 }
예제 #2
0
 void OnTriggerExitEvent_OnTriggerExited(TriggerEnterCollider sender, Collider other)
 {
     if (_triggeringTags.Contains(other.tag))
     {
         _triggeringObject = other.gameObject;
         TriggerEvent();
         _triggeringObject = null;
     }
 }
예제 #3
0
    private void TriggerSetEnterHandler(TriggerEnterCollider trigger, Collider collider)
    {
        if (gameObject.activeSelf && _triggeringTags.Contains(collider.tag))
        {
            _trigger          = trigger;
            _triggeringObject = collider.gameObject;

            TriggerEvent();
        }
    }
예제 #4
0
 void OnTriggerEnterEvent_OnTriggerEntered(TriggerEnterCollider sender, Collider other)
 {
     if (gameObject.activeSelf && _triggeringTags.Contains(other.tag))
     {
         if (_disableColliderAfterTrigger)
         {
             sender.enabled = false;
         }
         _triggeringObject = other.gameObject;
         TriggerEvent();
         _triggeringObject = null;
     }
 }