private void OnCollisionEnter(Collision collision) { if (collision.collider.tag == "Enemy" && collision.relativeVelocity.magnitude > 4 && parrileable) { EnemyBehaviour enemy = collision.gameObject.GetComponent <EnemyBehaviour>(); enemy.RecieveHit(); Debug.Log("EnemyHitted"); //EndCooldown ui.EndCooldown(); //player.UpdateHits(1); } }