Пример #1
0
 private void ResetHitDetection()
 {
     if (_hitDetection)
     {
         _hitDetection.OnRaycastHitStop();
         _hitDetection = null;
     }
 }
Пример #2
0
    private void ManageCharacterHit(RaycastHit hitCharacter)
    {
        var hitObject = hitCharacter.collider.gameObject;

        _hitDetection = hitObject.GetComponent <RaycastHitDetection>();
        if (_hitDetection)
        {
            _hitDetection.OnRaycastHit();
        }
    }