Exemple #1
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.CompareTag("Player"))
     {
         OriginalParentTracker parentTracker = GetComponent <OriginalParentTracker>();
         if (other.transform == parentTracker.GetSource())
         {
             return;
         }
         PlayerEventMessenger messenger = other.GetComponent <PlayerEventMessenger>();
         messenger.SendSetAblazeEvent(parentTracker.GetSource().gameObject, _name, _duration, _ticks, _damage);
     }
 }
 private void OnTriggerEnter(Collider other)
 {
     if (other.CompareTag("Player"))
     {
         OriginalParentTracker parentTracker = GetComponent <OriginalParentTracker>();
         if (other.transform == parentTracker.GetSource())
         {
             return;
         }
         PlayerEventMessenger messenger = other.GetComponent <PlayerEventMessenger>();
         messenger.SendKnockbackEvent(parentTracker.GetSource().gameObject, _name, CalculateDisplacement(), _knockbackDuration);
         messenger.SendHealthChangeEvent(parentTracker.GetSource().gameObject, _name, -_damage, HealthChangeType.Generic);
     }
 }