private void OnTriggerEnter(Collider other) { if (other.CompareTag("Player") && PlayerAttack.canDeflect && !Block) { playerVie.PlayerDeflected(); asBeenDeflected = true; Block = true; } else if (other.CompareTag("Player") && !PlayerAttack.canDeflect) { Vector3 direction = transform.position - player.transform.position; playerVie.PlayerGetHit(damage); playerVie.GetComponent <Rigidbody>().AddForce(-direction * knockback, ForceMode.Impulse); } }