internal GameController controller;
[SerializeField] private float shotForce;
+ [SerializeField] private AudioSource ballHitSound;
+ [SerializeField] private AudioClip ballHitClip;
public Rigidbody2D Rigidbody => _rigidbody != null ? _rigidbody : _rigidbody = GetComponent<Rigidbody2D>();
private Rigidbody2D _rigidbody;
private void OnCollisionEnter2D(Collision2D other)
{
+ ballHitSound.PlayOneShot(ballHitClip);
controller.BallDropped();
}