void OnCollisionEnter2D(Collision2D col) { if (col.gameObject.tag == "Enemy") { Destroy(col.gameObject); player.AdjustHitpoints(-1); FindObjectOfType <PlayerInput>().recoilFromHit(.5f); } }