private void CrateDead(Vector2 xhairPos) // Compare crate location to crosshair location. { if (!isDead) { float dist = Vector3.Distance(gameObject.transform.position, xhairPos); if (dist <= 0.5f) { isDead = true; _shoot.AmmoPickup(); Destroy(gameObject); } } }