Example #1
0
    public static void PlayBadSound()
    {
        BadSound soundSource = GameObject.FindObjectOfType <BadSound>();

        soundSource.GetComponent <AudioSource>().volume = soundEffectVolume * 0.1f;
        soundSource.GetComponent <AudioSource>().Play();
    }
Example #2
0
 // Use this for initialization
 void Start()
 {
     BadSound.instance = this;
 }