// play a sound if we have a sound controller void PlaySound(SoundController.Sound sound) { if (SoundController.m_instance != null) { SoundController.m_instance.PlaySound(sound); } }
public void SwitchMusic(Sound songNum) { if (currentlyPlaying != songNum) { //stop all music first. for (int i = 0; i < 3; i++) { sounds[i].Stop(); sounds[i].time = 0; } //play selected song sounds[(int)songNum].Play(); currentlyPlaying = songNum; } }