void OnCollisionEnter(Collision col) { if (rend.isVisible == false && onlyPlayIfVisible == true) { return; } if (col.gameObject.tag == "Floor") { playSounds.PlayFloorSound(); } else if (col.gameObject.tag == "Ball") { playSounds.PlayBallSound(); } }