Hey guys the question says it all but I’ll go a little more in depth here. I have figured out how to get my music to not play if the player chooses to turn off music in the options menu. How do I get the sounds not to play efficiently?
Right now my LevelManager holds the music clip and plays it depending on the GameManagers playMusic boolean. I have the same boolean for playSound. Sorry for the sudo code. I’m at work waiting for my computer to finish something.
Right now I have this:
BulletClass: PauseableObject {
void Start() {
//sound get initialized here
if(GameObject.Find("GameManager").GetComponent<GameManager>().playingSound == true){
audio.Play();
}
}