//when an enemy hits the paddle line, dec the HP as needed private void checkPos() { if (transform.position.x <= -20) { sm.decHP(); Destroy(gameObject); } }
//decrements health and ensures next ball launch is consistent private void Death() { start = false; rb.velocity = new Vector3(0f, 0f, 0f); sm.decHP(); }